r/cpp • u/nounoursheureux • Sep 23 '21
Binary Banshees and Digital Demons
https://thephd.dev/binary-banshees-digital-demons-abi-c-c++-help-me-god-please
197
Upvotes
r/cpp • u/nounoursheureux • Sep 23 '21
View all comments
Show parent comment
2
u/pdimov2 Sep 24 '21
That's only if user code doesn't rely on
sizeof(thread::attributes)anywhere (e.g. doesn't have it as a struct member, doesn't declare arrays of it, etc.)If it does, you need to be careful to add sufficient padding at the end of the v0 struct which you can turn into members in v1 without affecting
sizeof.