Emilio Cobos Álvarez
Emilio Cobos Álvarez
Yeah, I think the value is wrong, but in this case it's likely clang lying to us about what the value is unfortunately... Would need to debug this properly, but...
Gah, virtual inheritance... We don't have any code for handling it and we're missing the base class pointer. Thanks for reporting, will investigate how to extract this info from clang.
After digging a bit more I don't think this is due to virtual inheritance anymore (it sort of is, because there was a bug in our handling of virtual inheritance,...
More minimized: ```cpp class basic_ios { }; class basic_ostream: virtual basic_ios { }; class ostrstream:basic_ostream { int _M_buf; }; class LogStream:ostrstream { int ctr_; }; ``` I think this is...
I'll grab a debugger and inspect the fields, but I suspect that `offsetof(LogStream, crt_)` is going to be 8-byte aligned, but not 16-byte aligned (that is, contiguous to `_M_buf`).
Yup, not related to virtual inheritance at all, more minimized: ```cpp class ostrstream { void* ptr; int _M_buf; }; class LogStream:ostrstream { int ctr_; }; ``` I'm not sure what's...
I guess the easiest way to solve this is inlining all the base class fields, then add helper methods to transmute as base classes, instead of the way we represent...
cc @fitzgen, can you think of any better option?
Ugh, making that approach work with template parameters will need implementing template parameter resolution logic I really don't want to write :(
I guess it's the only sensible option though, more ideas appreciated.