Comment # 2 on bug 1087136 from
The problem is that libLLVM is built with rtti, but the tests are built without
rtti. It did not matter in the past, but it matters now with new version of
libstdc++ that came with gcc8.

The OrcJITTests calls `std::make_shared`, which eventually calls `__shared_ptr`
and that calls `std::_Sp_counted_ptr_inplace<...>::_M_get_deleter`. This
`_M_get_deleter` takes a `std::type_info` parameter. If rtti is disabled, then
some kind of fake type_info is passed instead.

When the test is run, the `__shared_ptr` constructor from the OrcJITTests
binary calls `std::_Sp_counted_ptr_inplace<...>::_M_get_deleter` from the
libLLVM library. Each is compiled with different rtti, so they disagree on what
the parameter means, because of this the `std::shared_ptr` is eventually
created with nullptr inside. Later the test crashes when trying to use it.

AFAIK mixing rtti and non-rtti code is not good idea. LibLLVM is built without
rtti by default, but they recommend to turn it on for packaging, which we do.
The tests are always built without rtti - I think this is a bug in LLVM build
system.


You are receiving this mail because: