It's also OK if a or b is void* or such. Probably not if a char*, I probably want a warning on that. Some good heuristics are necessary.
-
-
struct foo a = b; struct foo a = { 0 }; a.baz = b.baz; a.qux = b.qux; Much more boilerplate. :/
-
Does { 0 } promise to initialize padding to 0? Or do I need memset for that?
-
I would like a hardening mode where the compiler forces all struct padding to be zero. Concerned about leaking stack cookie, for instance.
-
Well stack cookie should be erased *before* the memory can be reused.
-
Right that is an obvious thing to do, I should have checked the stack check assembly. Still concerned about similar leaks.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.