[Bug c/105950] > O2 optimization causes runtime (SIGILL) during main initialization

jkanapes at yahoo dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 14 16:56:10 GMT 2022


--- Comment #26 from John Kanapes <jkanapes at yahoo dot com> ---
    On Tuesday, June 14, 2022 at 06:37:17 PM GMT+3, redi at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:  


--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to John Kanapes from comment #22)
>> It took you 4 posts to explain me what to do.
>> It took me 4 posts to understand what you were talking about.
>> You should explain better.

>You should read better. Comment 3 is perfectly clear.

>"For UBSan, you can't just compile with -fsanitize=undefined, you need to link
> with that flag as well."

> That 

I am sorry, that's not at all clear to me. It tells me that I first need to
compile with fsanitized and then link with it.Since i couldn't even compile
with it, due to the undefined references to ubsan_handles, how could I link?
I tried to link against the -lubsan library, just to get past compilation, and
you told me that this was wrong.Finally I ended up just linking with that flag.
You have to bear in mind, that us programmers do not uselinker flags and do not
know about them:(

How could I explain it bettter?
"fsanitized=undefined is a linker flag. Example: gcc test.o example.o ${LIBS}
fsanitized=undefined -o test"

(In reply to John Kanapes from comment #23)
>> What do you do with the sources after the ticket?

>They will stay attached here. If you don't want them to be public, you need to
>reduce it to something smaller that still shows the bug (which you've said you
>can't) or put them somewhere online and persuade somebody here to download them
>and try to reproduce and reduce it for you.
That is extra work for you. I wasn;t able to do it, and I know the code. 
But if you can do smt about it when you find the bug, I would be grateful.I
will upload it to my dropbox account and then send you the link.

More information about the Gcc-bugs mailing list