New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluating the size of a structure is wrongly done #4763
Comments
From @SkarsnikWhile writing a binding for Gumbo (A c99 lib to parse html) I came across an error on amd64 bits. One of the mapped struct has his size evaluated wrongly by nativesizeof (different than a call from sizeof see: http://pastebin.com/FVagmG6T). It provokes random segfault because of that. It seem NC try to align the struct and fail. (8 bytes are added) After isolating on a test file the struct (see attached file) and tracking some value on I appear that after evaluating the size of the 2 last attributes (12 bytes each one) |
From @SkarsnikLe Mer 18 Nov 2015 07:53:46, scolinet@gmail.com a écrit :
The pastbin link is http://pastebin.com/FVagmG6T the ) get in the link |
From @FROGGSI can confirm that the alignment is wrong. To prove, I created this repo: https://github.com/FROGGS/p6-Gumbo # Failed test 'sizeof(GumboElement)' Which hints at the last two attributes of the GumboElement structure, as the ticket already pointed out. |
The RT System itself - Status changed from 'new' to 'open' |
From @FROGGSThe fix for this misalignment is: MoarVM/MoarVM@7b382acd61 Closing ticket as resolved. |
1 similar comment
From @FROGGSThe fix for this misalignment is: MoarVM/MoarVM@7b382acd61 Closing ticket as resolved. |
@FROGGS - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126675 (status was 'resolved')
Searchable as RT126675$
The text was updated successfully, but these errors were encountered: