https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #8 from Nathan Teodosio ---
Ah sorry, I got fixated in the different behavior when swapping the order and
didn't challenge the function.
Thank you Andrew for elaborating on that and on -fsanitize=address, that is
really appreciated!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #7 from Andrew Pinski ---
Note valgrind in this case cannot always capture buffer overruns due to it
cann't easily add a redzone (buffer to detect overruns) for stack arrays. This
is why -fsanitize=address is more powerful than both
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #5 from Nathan Teodosio ---
In none of them. Or am I overlooking a buffer overrun here? Also with Clang I
get no stack smashing even with -fstack-protector-all.
In any case I fail to see why that would be dependent on which of the a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #4 from Jonathan Wakely ---
Jut to be clear on the bug being reported, are you expecting the error to be
detected in all cases?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #3 from Richard Biener ---
I think that's somewhat expected.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #2 from Nathan Teodosio ---
Created attachment 58691
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58691&action=edit
Source file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115965
--- Comment #1 from Nathan Teodosio ---
Created attachment 58690
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58690&action=edit
Preprocessed file (compressed with Gzip)