Build failure on main branch

22 views
Skip to first unread message

Meir Shpilraien

unread,
Aug 6, 2023, 11:27:36 AM8/6/23
to v8-dev
Hey, 

Recently we started to get an error when building the main branch on debug mode.
The error we get:

```
../../src/wasm/wasm-module.cc:618:3: error: static assertion failed due to requirement 'sizeof(v8::internal::wasm::WasmModule) == 848': Update {EstimateCurrentMemoryConsumption} when adding fields to WasmModule
  618 |   UPDATE_WHEN_CLASS_CHANGES(WasmModule, 848);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:17: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/wasm-module.cc:618:3: note: expression evaluates to '896 == 848'
  618 |   UPDATE_WHEN_CLASS_CHANGES(WasmModule, 848);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:35: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ~~~~~~~~~~~~~~~~~~^~~~~~~
../../src/wasm/wasm-module.cc:673:3: error: static assertion failed due to requirement 'sizeof(v8::internal::wasm::TypeFeedbackStorage) == 160': Update {EstimateCurrentMemoryConsumption} when adding fields to TypeFeedbackStorage
  673 |   UPDATE_WHEN_CLASS_CHANGES(TypeFeedbackStorage, 160);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:17: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/wasm-module.cc:673:3: note: expression evaluates to '176 == 160'
  673 |   UPDATE_WHEN_CLASS_CHANGES(TypeFeedbackStorage, 160);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:35: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ~~~~~~~~~~~~~~~~~~^~~~~~~
../../src/wasm/wasm-module.cc:691:3: error: static assertion failed due to requirement 'sizeof(v8::internal::wasm::WasmModule) == 848': Update {EstimateCurrentMemoryConsumption} when adding fields to WasmModule
  691 |   UPDATE_WHEN_CLASS_CHANGES(WasmModule, 848);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:17: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/wasm-module.cc:691:3: note: expression evaluates to '896 == 848'
  691 |   UPDATE_WHEN_CLASS_CHANGES(WasmModule, 848);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wasm/std-object-sizes.h:69:35: note: expanded from macro 'UPDATE_WHEN_CLASS_CHANGES'
   69 |   static_assert(sizeof(classname) == size,                               \
      |                 ~~~~~~~~~~~~~~~~~~^~~~~~~
3 errors generated.
```

We do not get this error on official version or on release build. I was wondering if we are doing something wrong or is it something that is broken currently?

Thanks,
Meir.

Jakob Kummerow

unread,
Aug 7, 2023, 5:33:35 AM8/7/23
to v8-...@googlegroups.com
Hi Meir,

Thanks for reporting this. That's a new check that we recently introduced. It is unfortunately toolchain-dependent, so presumably something about the way you build is non-standard. As a guess: are you building with `use_custom_libcxx = false`? That reproduces similar failures for me locally. I'll fix those later today. If there's something else that's different for your setup, please let me know.

Cheers,
Jakob


Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

--
--
v8-dev mailing list
v8-...@googlegroups.com
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 v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/4f3e1cfa-7329-4d69-bbd4-54861b03ed23n%40googlegroups.com.


--

Jakob Kummerow | Software Engineer, V8 | Google Germany GmbH | Erika-Mann-Str. 33, 80636 München 

Registergericht und -nummer: Hamburg, HRB 86891 | Sitz der Gesellschaft: Hamburg | Geschäftsführer: Paul Manicle, Liana Sebastian

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.


Meir Shpilraien

unread,
Aug 7, 2023, 7:28:15 AM8/7/23
to v8-dev
Thanks Jakob,

You are right, I do use `use_custom_libcxx = false`, I just tested without it and it compiled successfully so I guess this is really the issue.
Here is the rest of my compilation options (if its still relevant): `v8_monolithic=true v8_use_external_startup_data=false treat_warnings_as_errors=false is_component_build=false use_custom_libcxx = false`.

Thanks,
Meir

Jakob Kummerow

unread,
Aug 7, 2023, 8:09:38 AM8/7/23
to v8-...@googlegroups.com
Thanks for confirming. Fix is in flight: https://chromium-review.googlesource.com/c/v8/v8/+/4756844

Reply all
Reply to author
Forward
0 new messages