public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
@ 2015-07-20 16:43 ` kargl at gcc dot gnu.org
2015-07-21 6:05 ` zeccav at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-07-20 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Vittorio Zecca from comment #0)
> ! gcc-5.2.0/gcc/fortran/trans-expr.c:5701:19: runtime error: member call on
> null pointer of type 'struct vec'
> ! gfortran source line "retargs->splice (arglist);"
> ! retargs is NULL
> ! double check with "gcc_assert(retargs);" immediately before
> call sub
> END
What compiler options? What target? What is sub?
With
subroutine sub
end subroutine sub
gfortran 6.0 and 5.2.1 compile, link your code, and executes
without an error.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
2015-07-20 16:43 ` [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec' kargl at gcc dot gnu.org
@ 2015-07-21 6:05 ` zeccav at gmail dot com
2015-07-21 9:36 ` dominiq at lps dot ens.fr
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2015-07-21 6:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
1) No explicit options, just the default ones, -S will suffice.
2) Sorry, I did not specify the target is x86-64, but I got the same with -m32
3) sub is not needed, the code should just be compiled to exhibit the bug
I have a sanitized (-fsanitize=address -fsanitize=undefined) version of
gfortran.
In the comments I put the output message from the sanitizer during compilation.
What happens is that the pointer retargs is NULL. I believe this is bad.
This fragment of code from gfc_conv_procedure_call is thus erroneous
because it dereferences a null pointer.
I did double check it by putting
gcc_assert(retargs);
immediately before its dereferencing. I then got an ICE at that line.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
2015-07-20 16:43 ` [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec' kargl at gcc dot gnu.org
2015-07-21 6:05 ` zeccav at gmail dot com
@ 2015-07-21 9:36 ` dominiq at lps dot ens.fr
2015-07-21 18:49 ` sgk at troutmask dot apl.washington.edu
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-07-21 9:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-07-21
Ever confirmed|0 |1
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I have a sanitized (-fsanitize=address -fsanitize=undefined) version of gfortran.
Could you please post the way you build gcc (gfortran -v)?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2015-07-21 9:36 ` dominiq at lps dot ens.fr
@ 2015-07-21 18:49 ` sgk at troutmask dot apl.washington.edu
2015-07-21 19:44 ` sgk at troutmask dot apl.washington.edu
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-07-21 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Jul 21, 2015 at 06:05:05AM +0000, zeccav at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
>
> --- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
> 1) No explicit options, just the default ones, -S will suffice.
> 2) Sorry, I did not specify the target is x86-64, but I got the same with -m32
> 3) sub is not needed, the code should just be compiled to exhibit the bug
>
> I have a sanitized (-fsanitize=address -fsanitize=undefined) version
> of gfortran. In the comments I put the output message from the sanitizer
> during compilation.
I completely missed this as I don't you -fsanitize=.
> What happens is that the pointer retargs is NULL. I believe this is bad.
> This fragment of code from gfc_conv_procedure_call is thus erroneous
> because it dereferences a null pointer.
> I did double check it by putting
> gcc_assert(retargs);
> immediately before its dereferencing. I then got an ICE at that line.
It would have been helpful if you had included a diff
for your assert in the original report. I think I have
a working patch. I know in about 10 seconds. Yep. It
works.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2015-07-21 18:49 ` sgk at troutmask dot apl.washington.edu
@ 2015-07-21 19:44 ` sgk at troutmask dot apl.washington.edu
2015-07-22 8:16 ` zeccav at gmail dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-07-21 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #8 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Jul 21, 2015 at 07:42:17PM +0000, zeccav at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
>
> --- Comment #7 from Vittorio Zecca <zeccav at gmail dot com> ---
> I confirm the patch works
>
Thanks for confirmation. Waiting for review/approval.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2015-07-21 19:44 ` sgk at troutmask dot apl.washington.edu
@ 2015-07-22 8:16 ` zeccav at gmail dot com
2015-08-03 16:57 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2015-07-22 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #9 from Vittorio Zecca <zeccav at gmail dot com> ---
I should have written that I tried it not only on the test case I sent
but on the whole fortran
testsuite in gcc/testsuite.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2015-07-22 8:16 ` zeccav at gmail dot com
@ 2015-08-03 16:57 ` kargl at gcc dot gnu.org
2015-08-03 17:18 ` kargl at gcc dot gnu.org
2015-08-03 17:19 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-08-03 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #10 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon Aug 3 16:56:39 2015
New Revision: 226517
URL: https://gcc.gnu.org/viewcvs?rev=226517&root=gcc&view=rev
Log:
2015-08-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66942
* trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2015-08-03 16:57 ` kargl at gcc dot gnu.org
@ 2015-08-03 17:18 ` kargl at gcc dot gnu.org
2015-08-03 17:19 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-08-03 17:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #11 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon Aug 3 17:17:51 2015
New Revision: 226521
URL: https://gcc.gnu.org/viewcvs?rev=226521&root=gcc&view=rev
Log:
2015-08-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66942
* trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-expr.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec'
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2015-08-03 17:18 ` kargl at gcc dot gnu.org
@ 2015-08-03 17:19 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-08-03 17:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org
Target Milestone|--- |5.3
--- Comment #12 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch. Thanks for the bug report.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-08-03 17:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-66942-4@http.gcc.gnu.org/bugzilla/>
2015-07-20 16:43 ` [Bug fortran/66942] trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec' kargl at gcc dot gnu.org
2015-07-21 6:05 ` zeccav at gmail dot com
2015-07-21 9:36 ` dominiq at lps dot ens.fr
2015-07-21 18:49 ` sgk at troutmask dot apl.washington.edu
2015-07-21 19:44 ` sgk at troutmask dot apl.washington.edu
2015-07-22 8:16 ` zeccav at gmail dot com
2015-08-03 16:57 ` kargl at gcc dot gnu.org
2015-08-03 17:18 ` kargl at gcc dot gnu.org
2015-08-03 17:19 ` kargl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).