Hacker News new | ask | show | jobs
by captain_perl 2944 days ago
I'm skeptical that it was implemented that way because of kernel memory leaking concerns.

More likely it was done to prevent Windows API calls from panicking when they accessed unset parameter structures.

As a former Windows programmer, that was one of the largest sources of errors back in the Win32 days.

1 comments

But you don't access the padding; it's generally implicitly added by the compiler to comply with the ABI rules for the platform. That argument might make sense if this was about zeroing _all_ stack objects not explicitly initialised, but it's explicitly talking about the padding.