Skip to content

Commit e4d31ae

Browse files
committed
ACLiC TThreadedObjectAutoMemManagement on linux32 due to llvm-jit ABI issue:
This causes failures with ``` #0 0xb6e5c7e3 in std::_Head_base<0u, std::thread::id const&, false>::_M_head (__b=...) at /usr/include/c++/8/tuple:160 #1 0xb6e5c7cb in std::_Tuple_impl<0u, std::thread::id const&>::_M_head (__t=...) at /usr/include/c++/8/tuple:351 root-project#2 0xb6e5d488 in std::__get_helper<0u, std::thread::id const&> (__t=...) at /usr/include/c++/8/tuple:1304 root-project#3 0xb6e5d462 in std::get<0u, std::thread::id const&> (__t=std::tuple containing = {...}) at /usr/include/c++/8/tuple:1315 root-project#4 0xb6e5d4ad in std::pair<std::thread::id const, unsigned int>::pair<std::thread::id const&, 0u>(std::tuple<std::thread::id const&>&, std::tuple<>&, std::_Index_tuple<0u>, std::_Index_tuple<>) (this=0xa48005e0, __tuple1=std::tuple containing = {...}, __tuple2=empty std::tuple) at /usr/include/c++/8/tuple:1667 root-project#5 0xb6e5c863 in std::pair<std::thread::id const, unsigned int>::pair<std::thread::id const&>(std::piecewise_construct_t, std::tuple<std::thread::id const&>, std::tuple<>) (this=0xa48005e0, __first=<error reading variable: Cannot access memory at address 0x7c>, __second=empty std::tuple) at /usr/include/c++/8/tuple:1657 root-project#6 0xaf853abc in ?? () root-project#7 0xb7722fd2 in start_thread (arg=<optimized out>) at pthread_create.c:486 root-project#8 0xb76386d6 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:108 ``` Note esp the JIT frame, and the broken parameter address 0x7c, signaling an ABI issue. When running this test compiled (root.exe ....C+) the test passes.
1 parent 4dd8e01 commit e4d31ae

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

root/multicore/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ if(ROOTTEST_OS_ID MATCHES Ubuntu)
55
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")
66
endif()
77

8-
ROOTTEST_ADD_TEST(TThreadedObjectAutoMemManagement
9-
MACRO testTThreadedObjectAutoMemManagement.C)
8+
if(UNIX AND 32BIT)
9+
# linux32 llvm-JIT ABI issue constructing the pair of map<tthread::id, uint>.
10+
# Compile instead.
11+
ROOTTEST_ADD_TEST(TThreadedObjectAutoMemManagement
12+
MACRO testTThreadedObjectAutoMemManagement.C+)
13+
else()
14+
ROOTTEST_ADD_TEST(TThreadedObjectAutoMemManagement
15+
MACRO testTThreadedObjectAutoMemManagement.C)
16+
endif()
1017

1118
if(ROOT_imt_FOUND)
1219

root/multicore/testTThreadedObjectAutoMemManagement.C

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#ifdef __ACLIC__
2+
#include <ROOT/TThreadedObject.hxx>
3+
#include <TFile.h>
4+
#include <TH1.h>
5+
#include <TROOT.h>
6+
#include <iostream>
7+
#endif
8+
19
int testTThreadedObjectAutoMemManagement() {
210
ROOT::EnableThreadSafety();
311
const auto filename = "testTThreadedObjectAutoMemManagement.root";

0 commit comments

Comments
 (0)