Re:SerenityOS Browser now passes the Acid3 test
by remexre on Wednesday March 30, 2022 @03:48PM
(#30859972)
(Have never written Zig)
Does the design of the language make them less (or more) likely to occur, though? e.g. all these things are possible in Forth too, but the design of the language definitely seems to conspire to make them less likely than C in my experience (I probably have about as many hours in each now? Roughly 1k, maybe 1.5k?).
(I suspect that this is the case in Forth because the stack gives a "linear-like feel" to most code; it's more obvious that you're accidentally not freeing something, because you need to explicitly discard it.)
Use after free, double free, invalid stack RW, uninitialized data, race conditions, etc. They're all possible to be found in Zig programs, because the language doesn't provide assurances against them.