[Bug ipa/66896] ipa-prop.c:2479 runtime error: member call on null pointer of type 'struct ipa_polymorphic_call_context'

zeccav at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jul 24 17:24:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66896

--- Comment #11 from Vittorio Zecca <zeccav at gmail dot com> ---
I have a version of gcc 5.2.0 compiled with the -fsanitize=undefined option.
This sanitized version gave me a runtime error due to dereferencing
the pointer dst_ctx
which was NULL. After the change I suggested the message disappeared.

You may double check my finding, as I did myself, by putting

assert(dst_ctx)

before its dereferencing in ipa-prop.c as in

assert(dst_ctx),dst_ctx->combine_with (ctx);

It happens twice in isa-prop.c

Then try it with the two C codes I sent, with option -O2



More information about the Gcc-bugs mailing list