From nobody Sun Jan 19 16:20:13 2025
X-Original-To: bugs@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybdws5lFzz5lQjT
	for <bugs@mlmmj.nyi.freebsd.org>; Sun, 19 Jan 2025 16:20:13 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybdws5GZZz3jM2
	for <bugs@FreeBSD.org>; Sun, 19 Jan 2025 16:20:13 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1737303613;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=BHU3xfeirtOfia2nJ7tJLJ7PPI5evwoJqpdUncLv4tM=;
	b=PZt35DZ74cJbV97XQ8h3RQi0F08lbMholS0YSHOTp5RaxI/+C52NATcYb50CRZ4rCHk2bq
	70yH94DfB1lLsfXYKo3baqnzFTivFK8zfTjrNVushcenknn+AkPfrLDWKHVQtze0P17kGJ
	qyEyQCZYY/QpS4FqT6HpBDkt3bvbW1ZZXRrG9NEWmYN2fCpKQNKD9o+IAxpIFdKCoBkIEo
	QC9knJyP0vzqxkdbKmePsUdl3MumKbRWTNxNn4Sqc6vBRSMmAvaB1+qcx0mr5i1+p4PK3z
	kNMXl5j5f0NuMp3r+SOseG5rFWTWKzkDeleq+R2axd+Imt+D9vfPCYkvOlMhpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1737303613;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=BHU3xfeirtOfia2nJ7tJLJ7PPI5evwoJqpdUncLv4tM=;
	b=xGc4NDt4ECg4wv/xQPUme+P7YVB/+WyOiQG5BYZjN8ECDxL5gUZahQluaRPT4I/VeubsO/
	59p66Doax9U/G0D0s706q+sYE4zVZcbVeJIs9T3ev7nJnjcpl6rHH7TiTLo1YqzQHKXriv
	1Z0eLDu33O5DSWIeX2Q2JQqHH6jD3KCqBFhhj/f7g/E5tPFPMgykTCOKrOmkbxfc7ulyOp
	zdXZ+OfG5uveir9MNr1H6LfzdBiUsxf879UaSMkYzK/3Eh4H+RXuX0rIXEXJr9LcPRNM51
	Rm3hTFYeLiZFO+7G8rUAUliT6kiaMArzynh302g/6HDqZCWAj9LJt9NVFjZOfw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737303613; a=rsa-sha256; cv=none;
	b=B0SkyNlxVj2fJBDl3zWlDrfP+5WC7y9JFojES2da3yM6yHbFVNUALDVAKiCvY5DbOtC+pG
	61dXgsuZlHwYKeLLu93+u/fpGpj1DjPv25Za2W1/nryS7QxOnWCA2IYfABmGYflaslN8+y
	I6AEF0s5pLn6/S2Fwsfqcqw8BSzUT3DFaEqE/ieJz3nINeLY8CFgN0kEzsTZXxEMYqpH6A
	d/VKoTrRDBIRZtthYnrMy4KE3AVkmq1k60fsmmb4Bw4kIJaY1u87uT172Q3mI69bhLOJwV
	M5fiUd28kmwOjssiNehwNxuLD8DNrS+pBHAk7fRJjC/Iu0xxpc2p/O/qsrdqNg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybdws4rgDzxhH
	for <bugs@FreeBSD.org>; Sun, 19 Jan 2025 16:20:13 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 50JGKD46078379
	for <bugs@FreeBSD.org>; Sun, 19 Jan 2025 16:20:13 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50JGKDSl078378
	for bugs@FreeBSD.org; Sun, 19 Jan 2025 16:20:13 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: bugs@FreeBSD.org
Subject: [Bug 235751] Failure to init TLS variables with func ptr inside
 shared lib
Date: Sun, 19 Jan 2025 16:20:13 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 14.2-RELEASE
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: dclarke@blastwave.org
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: bugs@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-235751-227-FakUiGVrKV@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-235751-227@https.bugs.freebsd.org/bugzilla/>
References: <bug-235751-227@https.bugs.freebsd.org/bugzilla/>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Id: Bug reports <freebsd-bugs.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-bugs
List-Help: <mailto:freebsd-bugs+help@freebsd.org>
List-Post: <mailto:freebsd-bugs@freebsd.org>
List-Subscribe: <mailto:freebsd-bugs+subscribe@freebsd.org>
List-Unsubscribe: <mailto:freebsd-bugs+unsubscribe@freebsd.org>
Sender: owner-freebsd-bugs@FreeBSD.org
MIME-Version: 1.0

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751

--- Comment #8 from Dennis Clarke <dclarke@blastwave.org> ---
(In reply to Konstantin Belousov from comment #7)

What precisely did you do?

I see no way that you made this work just fine on a 14.0-STABLE system
when it fails in the same way on 13.4-RELEASE-p1 machine :=20

$ uname -apKU=20
FreeBSD dasoyva 13.4-RELEASE-p1 FreeBSD 13.4-RELEASE-p1 GENERIC amd64 amd64
1304000 1304000
$ freebsd-version -kru=20
13.4-RELEASE-p1
13.4-RELEASE-p1
13.4-RELEASE-p2
$=20
$ which cc
/usr/bin/cc
$ CC=3D/usr/bin/cc
$ export CC
$=20
$ $CC --version
FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git
llvmorg-18.1.6-0-g1118c2e05e67)
Target: x86_64-unknown-freebsd13.4
Thread model: posix
InstalledDir: /usr/bin
$

$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-built=
in
-shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600
-D_REENTRANT -o t1.so -fPIC t1.c

$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-built=
in
-shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600
-D_REENTRANT -o foo t2.c t1.so

$ file foo
foo: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically
linked, for FreeBSD 13.4, with debug_info, not stripped

$ readelf -delV foo | grep -E 'NEED|NAME|PATH'
 0x0000000000000001 NEEDED               Shared library: [t1.so]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x000000006ffffffe VERNEED              0x340
 0x000000006fffffff VERNEEDNUM           1

$ ./foo
Segmentation fault (core dumped)

$ LD_LIBRARY_PATH=3D`pwd` ./foo
Segmentation fault (core dumped)
$=20

So you are saying that, with magic, the problem goes away on a 14 STABLE=20
machine and then returns everywhere else?

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