You probably found my refactoring (https://crrev.com/c/3647353) via git blame. Looks like the addition of ::heap::base::Stack to ThreadLocalTop ( https://crrev.com/c/3960991, [email protected] <[email protected]>) broke the is_standard_layout assertion that was added in 2018 ( https://crrev.com/c/1278793, [email protected] <[email protected]>).
The standard layout requirement is there to ensure that the offsetof expressions are actually well-defined. Having a std::unique_ptr and a std::vector in a class that is required to have standard layout indeed looks fishy. On Mon, Dec 19, 2022 at 2:02 PM Ben Noordhuis <[email protected]> wrote: > On Mon, Dec 19, 2022 at 1:43 PM Immanuel Haffner > <[email protected]> wrote: > > > > I am currently facing issues building V8 at version 11.0.226 for > embedding in my application. Compilation of several source files fails with > the following error: > > > > ../../../../../../third-party/v8/v8/src/execution/isolate-data.h:279:3: > error: static_assert failed due to requirement > 'std::is_standard_layout<v8::internal::ThreadLocalTop>::value' > > static_assert(std::is_standard_layout<ThreadLocalTop>::value); > > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ../../../../../../third-party/v8/v8/src/execution/isolate-data.h:281:3: > error: static_assert failed due to requirement > 'std::is_standard_layout<v8::internal::IsolateData>::value' > > static_assert(std::is_standard_layout<IsolateData>::value); > > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 1 warning and 2 errors generated. > > > > I compile V8 with flags > > > > is_clang=true clang_base_path=\"/usr\" use_lld=false use_gold=true > v8_enable_pointer_compression=true treat_warnings_as_errors=false > v8_use_external_startup_data=false use_sysroot=false > use_custom_libcxx=false clang_use_chrome_plugins=false target_cpu=\"x64\"" > > > > I have tried both my system Clang and Google's toolchain. The > compilation error is the same. My system clang is on 14.0.6. > > > > Git blame tells me @Clemens Backes is the author of the respective lines > of code. > > I hope you or someone else can help me out. > > IsolateData embeds ThreadLocalTop embeds Stack embeds std::unique_ptr > and std::vector. Those last two are likely not standard layout types > on your system. > > -- > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/CAHQurc_vTA009ypjv8umvpCXj7JZEbOMKmR9rWy8mBvTx_ONhw%40mail.gmail.com > . > -- Clemens Backes Software Engineer [email protected] Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAGO%3DqhBQRxPA_ScsVjXqrb78HE3mnDyU2b3kQ_ij-NW5f3GT1A%40mail.gmail.com.
