You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
alloc-override.c uses wrong type for std::nothrow_t argument in C++ operator new overrides #840
Note that the second argument here (and everywhere that std::nothrow_t is uses) is passed by reference, but _ZnwmRKSt9nothrow_t is passing mi_nothrow_t by value.
On most platform, especially since all the overrides simply ignore this argument, this is not an issue, but on Wasm C signatures are requires to match between compilation unit.
As it stands, under wasm64, we get a linker warning about the std::nothrow_t argument having a different width in libmimalloc compared to libc++.
Apologies for the late fix; I pushed a potential fix to dev/dev-slice where I redefine mi_nothrow_t to be a void* -- I guess this will fix the linker error as well?
Activity
Fix C++ function signatures in mimalloc (#21127)
Merge upstream 3.1.56 (#64)
redefine mi_nothrow_t to be a pointer to (probably) fix issue #840 to…
daanx commentedon Apr 19, 2024
Apologies for the late fix; I pushed a potential fix to
dev/dev-slicewhere I redefinemi_nothrow_tto be avoid*-- I guess this will fix the linker error as well?sbc100 commentedon Jul 12, 2024
Yup that should do it. I guess we can close this now.
mimalloc: issue microsoft/mimalloc#840 is now resolved
mimalloc: issue microsoft/mimalloc#840 is now resolved