nodejs / http-parser

http request/response parser for c
MIT License
6.32k stars 1.53k forks source link

Fix sizeof(http_parser) assert on i386 #525

Open mgorny opened 3 years ago

mgorny commented 3 years ago

The struct size is actually 28 bytes because the void field is 4 bytes shorter. As the people on the original bug explained, x86 has lower alignment requirements than other arches, so the struct is not padded. However, this does not mean you can ignore the void size difference.