crash with -flto and Ubuntu 16.04.2 and g++-6

crash with -flto and Ubuntu 16.04.2 and g++-6

#0  0x00007ffff6d5a799 in tbb::internal::intrusive_list_base<tbb::internal::intrusive_list<tbb::internal::generic_scheduler>, tbb::internal::generic_scheduler>::push_front(tbb::internal::generic_scheduler&) ()
    at ../../src/tbb/intrusive_list.h:175
#1  tbb::internal::generic_scheduler::create_master(tbb::internal::arena*) (a=0x0) at ../../src/tbb/scheduler.cpp:1181
#2  0x00007ffff6d4611c in tbb::internal::governor::init_scheduler_weak () at ../../src/tbb/governor.cpp:178
#3  tbb::internal::governor::local_scheduler_weak () at ../../src/tbb/governor.h:140
#4  tbb::internal::allocate_root_with_context_proxy::allocate (this=0x7fffffff8d60, size=88)
    at ../../src/tbb/task.cpp:67

anybody any clue?
It works fine in debug mode (using
I only did minor changes to tbb2017_20161128oss/build/

< CPLUS = g++
< CONLY = gcc
> CPLUS = g++-6
> CONLY = gcc-6
>         CPLUS_FLAGS = $(ITT_NOTIFY) -g -O3 -DUSE_PTHREAD -flto=8 -funroll-loops -ffast-math -march=native


Thread Topic: 

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

this also seems to be true, without -flto and even when replacing -O3 with -O2 or even with a nearly original (only compilers changed to version 6). Only when using it is not crashing. BTW the code is clean regarding valgrind.

If your version of TBB precedes 4.4.6, please upgrade. TBB 4.4.6 is the minimal version that works with GCC 6.

Correct. Since TBB 4.4.6, the -flifetime-dse=1 option is added to the TBB makefiles.

Leave a Comment

Please sign in to add a comment. Not a member? Join today