Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 May 2024 17:07:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 278701] Certain usage of thread_local and -fPIE results in an obscure message printout
Message-ID:  <bug-278701-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278701

            Bug ID: 278701
           Summary: Certain usage of thread_local and -fPIE results in an
                    obscure message printout
           Product: Base System
           Version: 14.0-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: vd@FreeBSD.org

freefall:~$ cat > main.cc
#include <string>

thread_local std::string s;

int main(int argc, char** argv)
{
    s =3D "aaa";
    return 0;
}

freefall:~$ c++ -fPIE main.cc -o main

freefall:~$ ./main
__cxa_thread_call_dtors: dtr 0x820b65830 from unloaded dso, skipping
freefall:~$

Same result with FreeBSD-14.0/clang-16.0.6 and FreeBSD-15.0/clang-18.1.4

The printed message is obscure because it is not clear if there is a bug in=
 the
program or in the library or if I am supposed to do something to resolve the
problem. Also, I think, the destructor of `s` is not called.

The message is printed from walk_cb_call() from
lib/libc/stdlib/cxa_thread_atexit_impl.c.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278701-227>