Skip to content

clang18 + libc++abi unittest failure #607

Open
@sternezsl

Description

When running unittest thrift/lib/cpp2/test/FutureTest.cpp

# ./bin/cpp2_test_FutureTest
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from ThriftServer
[ RUN      ] ThriftServer.FutureExceptions
*** Aborted at 1717719275 (Unix time, try 'date -d @1717719275') ***
*** Signal 11 (SIGSEGV) (0x399f5aa1403e8) received by PID 2529977 (pthread TID 0xffff257aa180) (linux TID 2529977) (c
ode: address not mapped to object), stack trace: ***
/usr/lib64/libfolly.so.1(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x3b) [0xffff2236fa07]
/usr/lib64/libfolly.so.1(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x3b) [0xffff2236fa07]
/usr/lib64/libfolly.so.1(+0x3ed8cb) [0xffff2236d8cb]
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffff257f8820]
/opt/llvm/18.1.6/lib/aarch64-unknown-linux-gnu/libc++abi.so.1(__dynamic_cast+0x1f) [0xffff2172075b]
/usr/lib64/libthriftcpp2.so.1.0.0(_ZN6apache6thrift12Thr
iftServer19setProcessorFactoryENSt3__110shared_ptrINS0_21AsyncProcessorFactoryEEE+0xf7) [0xffff236dcd1b]
./bin/cpp2_test_FutureTest(_ZN6apache6thrift23TestThriftServerFactoryI13TestInterfaceE6createEv+0x293) [0xaaab7c00a8d
b]
./bin/cpp2_test_FutureTest(_ZN34ThriftServer_FutureExceptions_Test8TestBodyEv+0x43) [0xaaab7c00453b]
/usr/lib64/libgtest.so(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x6f\
) [0xffff21915f1f]
/usr/lib64/libgtest.so(_ZN7testing4Test3RunEv+0xe3) [0xffff218f8047]
/usr/lib64/libgtest.so(_ZN7testing8TestInfo3RunEv+0x103) [0xffff218f94eb]
/usr/lib64/libgtest.so(_ZN7testing9TestSuite3RunEv+0x13b) [0xffff218f9daf]
/usr/lib64/libgtest.so(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x413) [0xffff2190772f]
/usr/lib64/libgtest.so(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_\
vEPKc+0x6f) [0xffff21916d97]
/usr/lib64/libgtest.so(_ZN7testing8UnitTest3RunEv+0x7f) [0xffff219072e3]
/usr/lib64/libfolly_test_support.so(main+0x3b) [0xffff23a957cf]
/lib64/libc.so.6(+0x30a1b) [0xffff21a10a1b]
/lib64/libc.so.6(+0x30a1b) [0xffff21a10a1b]
(safe mode, symbolizer not available)

It crashed on

if (auto serverInterface = dynamic_cast<ServerInterface*>(serviceHandler)) {

Simple demo built with c++20 works well. The platform is linux aarch64(same segmentfault on macOS m1), LLVM version is 18.1.6

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions