Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21.0.0: build of mksnapshot fails on linking with missing PushAllRegistersAndIterateStack symbol #50347

Closed
kloczek opened this issue Oct 23, 2023 · 15 comments

Comments

@kloczek
Copy link

kloczek commented Oct 23, 2023

Version

21.0.0

Platform

Linux x86/64

Subsystem

No response

What steps will reproduce the bug?

Source code configured with

%{set_build_flags} \
./configure \
        --openssl-use-def-ca-store \
        --prefix=%{_prefix} \
        --shared-brotli \
        --shared-cares \
        --shared-libuv \
        --shared-nghttp2 \
        --shared-openssl \
        --shared-zlib \
        --with-intl=system-icu \
        --verbose \
        --openssl-conf-name=openssl_conf \
        --openssl-is-fips \
        --shared \
        --without-corepack \
        %{nil}

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior? Why is that the expected behavior?

linking should not fail

What do you see instead?

Build fails on linking

/usr/bin/g++ -o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/mksnapshot -pthread -rdynamic -m64 -m64 -Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1 -Wl,--start-group /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/embedded-empty.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/embedded-file-writer.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/snapshot-empty.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/static-roots-gen.o /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_init.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_turboshaft.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_zlib.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a -lz -luv -lbrotlidec -lbrotlienc -lcares -lnghttp2 -lcrypto -lssl -licui18n -licuuc -licudata -ldl -lrt -Wl,--end-group In function ‘NewForOverwrite’, inlined from ‘GetCurrentDebugSideTableEntries’ at ../deps/v8/src/wasm/baseline/liftoff-compiler.cc:3592:0: ../deps/v8/src/base/vector.h:291: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 291 | return OwnedVector<T>(std::unique_ptr<T[]>(new T[size]), size); | /usr/include/c++/13/new: In member function ‘GetCurrentDebugSideTableEntries’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘EnterMicrotaskContext’ at ../deps/v8/src/api/api-inl.h:364:0, inlined from ‘EnterMicrotaskContextWrapper’ at ../deps/v8/src/codegen/external-reference.cc:1679:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In function ‘EnterMicrotaskContextWrapper’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘EnterContext’ at ../deps/v8/src/api/api-inl.h:356:0, inlined from ‘Enter’ at ../deps/v8/src/api/api.cc:1003:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In member function ‘Enter’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘SaveContext’ at ../deps/v8/src/api/api.h:432:0, inlined from ‘Enter’ at ../deps/v8/src/api/api.cc:1004:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In member function ‘Enter’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘SaveContext’ at ../deps/v8/src/api/api.h:432:0, inlined from ‘__ct_base ’ at ../deps/v8/src/api/api-inl.h:199:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In member function ‘__ct_base ’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘SaveContext’ at ../deps/v8/src/api/api.h:432:0, inlined from ‘__ct_base ’ at ../deps/v8/src/api/api-inl.h:199:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In member function ‘__ct_base ’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ ../deps/v8/src/heap/page.cc: In member function ‘AllocateFreeListCategories’: ../deps/v8/src/heap/page.cc:32: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 32 | new FreeListCategory*[owner()->free_list()->number_of_categories()](); | /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘FinalizeCall’, inlined from ‘ProcessFunction’ at ../deps/v8/src/wasm/module-compiler.cc:1444:0: ../deps/v8/src/wasm/module-compiler.cc:1380: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 1380 | new CallSiteFeedback::PolymorphicCase[cache_usage_]; | /usr/include/c++/13/new: In member function ‘ProcessFunction’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__ct ’ at ../deps/v8/src/bigint/bigint-internal.h:144:0, inlined from ‘DivideSchoolbook’ at ../deps/v8/src/bigint/div-schoolbook.cc:109:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘DivideSchoolbook’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘FromStringLarge’ at ../deps/v8/src/bigint/fromstring.cc:95:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘FromStringLarge’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__ct ’ at ../deps/v8/src/bigint/bigint-internal.h:144:0, inlined from ‘DivideBurnikelZiegler’ at ../deps/v8/src/bigint/div-burnikel.cc:235:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘DivideBurnikelZiegler’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__ct ’ at ../deps/v8/src/bigint/bigint-internal.h:144:0, inlined from ‘DivideBarrett’ at ../deps/v8/src/bigint/div-barrett.cc:300:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘DivideBarrett’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__ct ’ at ../deps/v8/src/bigint/bigint-internal.h:144:0, inlined from ‘DivideBarrett’ at ../deps/v8/src/bigint/div-barrett.cc:323:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘DivideBarrett’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__ct ’ at ../deps/v8/src/bigint/bigint-internal.h:144:0, inlined from ‘ComputeInverse’ at ../deps/v8/src/bigint/tostring.cc:404:0: ../deps/v8/src/bigint/bigint-internal.h:133: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 133 | explicit Storage(int count) : ptr_(new digit_t[count]) {} | /usr/include/c++/13/new: In member function ‘ComputeInverse’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ ../deps/v8/src/wasm/pgo.cc: In function ‘DeserializeTypeFeedback’: ../deps/v8/src/wasm/pgo.cc:127: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 127 | auto* polymorphic = new CallSiteFeedback::PolymorphicCase[num_cases]; | /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘make_unique’, inlined from ‘TryStringToDouble’ at ../deps/v8/src/numbers/conversions.cc:1474:0: /usr/include/c++/13/bits/unique_ptr.h:1085: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 1085 | { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } | /usr/include/c++/13/new: In function ‘TryStringToDouble’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘NewForOverwrite’, inlined from ‘Initialize’ at ../deps/v8/src/wasm/module-compiler.cc:2176:0, inlined from ‘ProcessFunctionBody’ at ../deps/v8/src/wasm/module-compiler.cc:2991:0: ../deps/v8/src/base/vector.h:291: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 291 | return OwnedVector<T>(std::unique_ptr<T[]>(new T[size]), size); | /usr/include/c++/13/new: In member function ‘ProcessFunctionBody’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ ../deps/v8/src/utils/allocation.h: In function ‘NewArray’: ../deps/v8/src/utils/allocation.h:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 41 | T* result = new (std::nothrow) T[size]; | /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ ../deps/v8/src/utils/allocation.h:44: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 44 | result = new (std::nothrow) T[size]; | /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewForOverwrite’, inlined from ‘Of’ at ../deps/v8/src/base/vector.h:304:0, inlined from ‘FinishFunction’ at ../deps/v8/src/wasm/baseline/liftoff-compiler.cc:1087:0, inlined from ‘Decode’ at ../deps/v8/src/wasm/function-body-decoder-impl.h:2629:0: ../deps/v8/src/base/vector.h:291: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 291 | return OwnedVector<T>(std::unique_ptr<T[]>(new T[size]), size); | /usr/include/c++/13/new: In member function ‘Decode’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘make_unique’, inlined from ‘VisitSwitchOnGeneratorState’ at ../deps/v8/src/baseline/baseline-compiler.cc:2294:0: /usr/include/c++/13/bits/unique_ptr.h:1085: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 1085 | { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } | /usr/include/c++/13/new: In member function ‘VisitSwitchOnGeneratorState’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘make_unique’, inlined from ‘VisitSwitchOnSmiNoFeedback’ at ../deps/v8/src/baseline/baseline-compiler.cc:2136:0: /usr/include/c++/13/bits/unique_ptr.h:1085: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 1085 | { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } | /usr/include/c++/13/new: In member function ‘VisitSwitchOnSmiNoFeedback’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘memcpy’, inlined from ‘AddAll’ at ../deps/v8/src/zone/zone-list-inl.h:38:0, inlined from ‘__ct ’ at ../deps/v8/src/zone/zone-list.h:49:0, inlined from ‘__ct ’ at ../deps/v8/src/ast/ast.h:1699:0, inlined from ‘__ct ’ at ../deps/v8/src/ast/ast.h:1766:0, inlined from ‘New’ at ../deps/v8/src/zone/zone.h:115:0, inlined from ‘NewCall’ at ../deps/v8/src/ast/ast.h:3116:0, inlined from ‘ParseLeftHandSideContinuation’ at ../deps/v8/src/parsing/parser-base.h:3568:0: /usr/include/bits/string_fortified.h:29: warning: ‘__builtin_memcpy’ specified bound between 18446744056529682432 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 29 | return __builtin___memcpy_chk (__dest, __src, __len, | ../deps/v8/src/deoptimizer/deoptimizer.cc: In member function ‘DoComputeOutputFrames’: ../deps/v8/src/deoptimizer/deoptimizer.cc:831: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 831 | output_ = new FrameDescription*[count]; | /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ ../deps/v8/src/deoptimizer/deoptimizer.cc:831: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 831 | output_ = new FrameDescription*[count]; | /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘NewArray’, inlined from ‘GetCallerArguments.constprop’ at ../deps/v8/src/runtime/runtime-scopes.cc:375:0: ../deps/v8/src/utils/allocation.h:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 41 | T* result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In function ‘GetCallerArguments.constprop’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewArray’, inlined from ‘GetCallerArguments.constprop’ at ../deps/v8/src/runtime/runtime-scopes.cc:395:0: ../deps/v8/src/utils/allocation.h:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 41 | T* result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In function ‘GetCallerArguments.constprop’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewArray’, inlined from ‘GetCallerArguments.constprop’ at ../deps/v8/src/runtime/runtime-scopes.cc:375:0: ../deps/v8/src/utils/allocation.h:44: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 44 | result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In function ‘GetCallerArguments.constprop’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewArray’, inlined from ‘GetCallerArguments.constprop’ at ../deps/v8/src/runtime/runtime-scopes.cc:395:0: ../deps/v8/src/utils/allocation.h:44: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 44 | result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In function ‘GetCallerArguments.constprop’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewForOverwrite’, inlined from ‘Of’ at ../deps/v8/src/base/vector.h:304:0, inlined from ‘RecompileLiftoffWithBreakpoints’ at ../deps/v8/src/wasm/wasm-debug.cc:274:0: ../deps/v8/src/base/vector.h:291: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 291 | return OwnedVector<T>(std::unique_ptr<T[]>(new T[size]), size); | /usr/include/c++/13/new: In member function ‘RecompileLiftoffWithBreakpoints’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘NewArray’, inlined from ‘InitializeGap’ at /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj/gen/torque-generated/src/objects/scope-info-tq-csa.cc:2902:0: ../deps/v8/src/utils/allocation.h:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 41 | T* result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In member function ‘InitializeGap’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In function ‘NewArray’, inlined from ‘InitializeGap’ at /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/obj/gen/torque-generated/src/objects/scope-info-tq-csa.cc:2902:0: ../deps/v8/src/utils/allocation.h:44: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 44 | result = new (std::nothrow) T[size]; | /usr/include/c++/13/new: In member function ‘InitializeGap’: /usr/include/c++/13/new:142:26: note: in a call to allocation function ‘operator new []’ declared here 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^ In member function ‘Resize’, inlined from ‘push_back’ at ../deps/v8/src/utils/detachable-vector.h:57:0, inlined from ‘EnterContext’ at ../deps/v8/src/api/api-inl.h:356:0, inlined from ‘ExecuteStartFunction’ at /usr/include/c++/13/bits/stl_tree.h:1912:0: ../deps/v8/src/utils/detachable-vector.h:91: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 91 | T* new_data_ = new T[new_capacity]; | /usr/include/c++/13/new: In member function ‘ExecuteStartFunction’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__RT_impl_Runtime_Call’ at /usr/include/c++/13/bits/stl_tree.h:1040:0, inlined from ‘Runtime_Call’ at /usr/include/c++/13/bits/stl_tree.h:900:0: ../deps/v8/src/compiler/turboshaft/assembler.h:2771: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 2771 | | /usr/include/c++/13/new: In function ‘Runtime_Call’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In member function ‘__ct ’, inlined from ‘__RT_impl_Runtime_CopyDataPropertiesWithExcludedPropertiesOnStack’ at /usr/include/c++/13/bits/hashtable.h:1011:0, inlined from ‘Runtime_CopyDataPropertiesWithExcludedPropertiesOnStack’ at /usr/include/c++/13/bits/hashtable.h:882:0: ../deps/v8/src/compiler/turboshaft/assembler.h:2771: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 2771 | | /usr/include/c++/13/new: In function ‘Runtime_CopyDataPropertiesWithExcludedPropertiesOnStack’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘SearchRegExpMultiple’, inlined from ‘__RT_impl_Runtime_RegExpExecMultiple’ at ../deps/v8/src/wasm/function-body-decoder-impl.h:3817:0, inlined from ‘Runtime_RegExpExecMultiple’ at ../deps/v8/src/wasm/function-body-decoder-impl.h:3292:0: ../deps/v8/src/wasm/function-body-decoder-impl.h:5518: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 5518 | CALL_INTERFACE_IF_OK_AND_REACHABLE(Forward, obj, stack_value(1)); | /usr/include/c++/13/new: In function ‘Runtime_RegExpExecMultiple’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘SearchRegExpMultiple’, inlined from ‘__RT_impl_Runtime_RegExpExecMultiple’ at ../deps/v8/src/wasm/function-body-decoder-impl.h:3820:0, inlined from ‘Runtime_RegExpExecMultiple’ at ../deps/v8/src/wasm/function-body-decoder-impl.h:3292:0: ../deps/v8/src/wasm/function-body-decoder-impl.h:5106: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 5106 | control_.size())) { | /usr/include/c++/13/new: In function ‘Runtime_RegExpExecMultiple’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘DeserializeSignature’, inlined from ‘UpdateDispatchTables’ at ../deps/v8/src/objects/objects.h:397:0: ../deps/v8/src/wasm/serialized-signature-inl.h:70: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 70 | out_reps->reset(new wasm::ValueType[sig_size]); | /usr/include/c++/13/new: In function ‘UpdateDispatchTables’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ In function ‘DeserializeSignature’, inlined from ‘__RT_impl_Runtime_TierUpWasmToJSWrapper’ at ../deps/v8/src/runtime/runtime-wasm.cc:436:0, inlined from ‘Runtime_TierUpWasmToJSWrapper’ at ../deps/v8/src/objects/ordered-hash-table.h:672:0: ../deps/v8/src/heap/objects-visiting-inl.h:141: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 141 | case kVisitJSApiObject: | /usr/include/c++/13/new: In function ‘Runtime_TierUpWasmToJSWrapper’: /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ ../deps/v8/src/compiler/turboshaft/assembler.h: In member function ‘Return’: ../deps/v8/src/compiler/turboshaft/assembler.h:2867: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 2867 | if (V8_UNLIKELY(stack().generating_unreachable_operations())) { | /usr/include/c++/13/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ /usr/bin/ld: /tmp/ccIKmK7s.lto.o: in function `heap::base::Stack::SetMarkerAndCallbackHelper(void*, void (*)(heap::base::Stack*, void*, void const*))': /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/../deps/v8/src/heap/base/stack.cc:204:(.text+0x17dd85): undefined reference to `PushAllRegistersAndIterateStack' collect2: error: ld returned 1 exit status make[1]: *** [tools/v8_gypfiles/mksnapshot.target.mk:212: /home/tkloczko/rpmbuild/BUILD/node-21.0.0/out/Release/mksnapshot] Error 1 rm 50479ebfa5bf6ed4828018cf344918414dcbf9fc.intermediate b484803befd5c79ff79c0c6ac8e25946b2b346a3.intermediate make: *** [Makefile:134: node] Error 2

Additional information

gcc 13.2.1.
I'm using LTO options passed over $CC, $CXX, $LDFLAGS, $CFLAGS, $CXXFLAGS.

@kloczek kloczek changed the title 21.0.0: build mksnapshot fails with missing PushAllRegistersAndIterateStack symbol 21.0.0: build of mksnapshot fails on linking with missing PushAllRegistersAndIterateStack symbol Oct 23, 2023
@bnoordhuis
Copy link
Member

I'm using LTO options passed over $CC, $CXX, $LDFLAGS, $CFLAGS, $CXXFLAGS.

This here is the problem, see e.g. #44195 for a similar report. The solution was to disable LTO. I'm not 100% sure (don't hit it myself) but I suspect a binutils bug.

@kloczek
Copy link
Author

kloczek commented Oct 24, 2023

Hmm .. so why more then year no one added this symbol to public interface to fix LTO build? 🤔

I'm not 100% sure (don't hit it myself) but I suspect a binutils bug.

Highly unlikely because if it would be binutils issue not only node would be affected.
Looking on all deps/v8/src/heap/base/asm/*/push_registers_asm.cc files I don't see that in any of those files PushAllRegistersAndIterateStack is declared as public symbol.


Just found yet another issue looking on linker params.
On linked objects list is 21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_zlib.a despite fact that I've configured source code with --shared-zlib
First in deps/v8/third_party/zlib is bundled almost year old zlib code.
Second is that I'm using zlib-ng which is way faster than zlib.

Should I open for that separated ticket? 🤔

@kloczek
Copy link
Author

kloczek commented Oct 24, 2023

I'm not sure but probably this link contains details about what needs to be done to make this symbol public.
https://stackoverflow.com/questions/29314847/how-to-set-a-globl-symbol-in-gas

@richardlau
Copy link
Member

Just found yet another issue looking on linker params. On linked objects list is 21.0.0/out/Release/obj.target/tools/v8_gypfiles/libv8_zlib.a despite fact that I've configured source code with --shared-zlib First in deps/v8/third_party/zlib is bundled almost year old zlib code. Second is that I'm using zlib-ng which is way faster than zlib.

Should I open for that separated ticket? 🤔

The zlib question is known:
Refs: #33848
Refs: #47493

@bnoordhuis
Copy link
Member

@kloczek you'd have to take that up with V8. The code in deps/v8 is not under out control and I don't have reason to believe this is otherwise a node bug so I'm going to close this.

I do have reason to believe it's a gcc/binutils bug because there have been plenty of bugs around GIMPLE and inline assembly. See if clang/llvm works for you.

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@kloczek
Copy link
Author

kloczek commented Oct 24, 2023

How it can be gcc issue if nowhere this symbol is defined as part of the ABI interface? 🤔

I have account in gcc bugzilla and I can open the case but I need more details about what you've found.

@kloczek
Copy link
Author

kloczek commented Oct 24, 2023

@pinskia
Copy link

pinskia commented Oct 24, 2023

This is a bug in v8. The top-level inline should just be a .S file instead. Why they used a top-level inline-asm in this case is just bad form.

@kloczek
Copy link
Author

kloczek commented Oct 25, 2023

Is it possible to reopen this ticket? 🤔

@bnoordhuis
Copy link
Member

No. Bug in a third-party dependency. Please report it upstream.

@kloczek
Copy link
Author

kloczek commented Oct 25, 2023

No. Bug in a third-party dependency. Please report it upstream.

You mean v8? 🤔

@bnoordhuis
Copy link
Member

Yes.

@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

BTW: why node is bundling soe many other projects?
All those bundles makes whole build process much more complicated.

@bnoordhuis
Copy link
Member

Because it means you get the same final product everywhere. Consistency, basically.

@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

Moment so you want o say that you are mainlining fork of the v8?
If yes why you are suggesting to report that issue to v8? 🤔
I don't see any git submodules in node repo so maintaining copies of all those repos is yet another waste of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants