Live data from Hacker News

GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows

phoronix.com

21–30 of 54 posts

Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows

#22
post #17

Need the `-Wanalyzer-out-of-bounds` option and it's only static. At compile time so. It can catch easy one, not the obscures cases.

Nice to have though and probably saves my forehead a lot of facepalms.

Edit: I also like the lib*san way of showing the variables and where everything is and is written to when you do oob writes but that is a whole other way of getting to it.

Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows

#23
What would be even better is if their analysis worked. Wstringop-overflow and related features have been broken since GCC 10, for five years, and remain broken. The last time range analysis actually worked well enough to be enabled was GCC 9. Projects of realistic complexity need to run with evrp-mode=legacy, or just do what almost everyone did or wants to do: switch to clang.

Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows

#24

[flagged]

I got a huge Premium opt-in box (on mobile) with a large button labelled "Disable" and small text to 'continue without'. I'm guessing Disable is to disable this box and subscribe to Premium so I clicked the small text not the large green Disable button.

Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows

#30
post #13

This is incredible and would make for an excellent teaching tool! For students it’s generally not helpful just to crash with “invalid access.” They need to be shown where the overflow occurred and ideally what reads/writes caused it.

I wish I had this all those times I had to guess what buffer exploded just by looking at the Valgrind output signaling invalid reads/writes.
Post reply on HN