[lttng-dev] New TLS usage in libgcc_s.so.1, compatibility impact

Florian Weimer fweimer at redhat.com
Mon Jan 15 11:44:45 EST 2024

* Iain Sandoe:

>> On 15 Jan 2024, at 15:35, Florian Weimer <fweimer at redhat.com> wrote:
>> * Carlos O'Donell:
>>> I agree. TLS should be seen more like .bss/.data rather than something
>>> that is allocated with malloc().
>> There wasn't consensus regarding this in 2014.  See below.
>>> If we leak memory via TLS that is a glibc bug that we can deal with,
>> This is something that libgcc_s.so.1 does in GCC 14 if the heap
>> trampolines are used.
> Is there a GCC BZ for this?
> (if there is something we should address in GCC, it would be better sooner)

Sorry, I wanted to write a reproducer first.  With it, I found two more

  Memory (resource) leak in -ftrampoline-impl=heap

  Incorrect symbol versions for __builtin_nested_func_ptr_created,
  __builtin_nested_func_ptr in libgcc_s.so.1

  __builtin_nested_func_ptr_created, __builtin_nested_func_ptr should be
  dynamically linked by default


More information about the lttng-dev mailing list