16 ms·
That's pretty much always a problem of memory corruption, which, imo, is very much a separate thing from undefined behavior. Yes, double-free, use-after-free, o
by dzaima 5y ago
That's pretty much always a problem of memory corruption, which, imo, is very much a separate thing from undefined behavior. Yes, double-free, use-after-free, or reading out-of-bounds is undefined behavior, but -Onone won't make those "better" somehow, and you just can't do anything about it without just completely and utterly changing what C is (and, were that done, some other language would just take its place as an unsafe language that's very nice for trivially making performant code, and we'd be back where we started)
- pjmlp 5y agoNot if liability finally becomes properly regulated. It is like selling food on a shitty street joint, people might keep on doing that, until the day sanitary health check comes around and closes it down.
- dzaima 5y agoI guess all I can say is one man's thrash is another man's treasure. I personally don't have much a reason to care about mamory safety of my programs, so I would hate to have restrictions on what and how I can do things, it would be literally just wasting my time as a programmer, and wasting performance too.