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


On Sun, Aug 6, 2023 at 5:27 PM Meir Shpilraien <m...@redis.com> wrote:

> 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.
>
>
> *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-dev@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+unsubscr...@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
> <https://groups.google.com/d/msgid/v8-dev/4f3e1cfa-7329-4d69-bbd4-54861b03ed23n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

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.

-- 
-- 
v8-dev mailing list
v8-dev@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKSzg3SCOZOSrt3%3DPNOoa3M6y81HPaTmsSmiJswSAruHAZU0Ow%40mail.gmail.com.

Reply via email to