From nobody Tue Jan 14 03:22:39 2025 X-Original-To: freebsd-ppc@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 4YXDw00t5nz5j1p0 for ; Tue, 14 Jan 2025 03:22:40 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YXDw00Dk8z3SmG; Tue, 14 Jan 2025 03:22:40 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736824960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YBDnI7qM4+20BLAko2GzYv0tbu3akmN2paP5gfPDt+g=; b=UR+BaRmCOpyR31D2Z+j1foEiNWdwO8MWHmZzvMPFC/Mix/LJSP6cGi6gMe+VlaGLZjWvpg gXH9cdj7AzDnHZGrMPoNEP0F1vc9UI4ojrLHacDLqI/ctbYRRMxU4mRg76S5x6t0jrSYVH C1yB2av+dymeDuIfgob3w6KnrEmbrDix1UsCEn3t+il1t6rxluPACXVjmvRz167vOubjSt LV0HyZHIRsmrrbs9ulI3d5fwT8AuGYG+J3u182w4Fzlbx3xYGDv5TP/4agX567/1ss1OA4 NoYqPNJEtJHLzNm4ddJQJ6e69Bapcs6QX7JDCmbu5zAzT376npM9Ufxy3WEK1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736824960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YBDnI7qM4+20BLAko2GzYv0tbu3akmN2paP5gfPDt+g=; b=ctRJDPB1p9U8KkJrvm7wp1/Y6Dqu8av59NygPfVJNbTyUriC9/Tf+2nbcKRRkJHuBNjL5o 0TP4b8bjY8GTFeNXM9cDyMJUyaE4ou9U+O9/YLHIebN+DM/B+DpO7euTLA/SzpiywscISX NH0yYwGUndnv/oW1s1pEFuW+/qUHYBslBjnzmM64JskeFV46ES1h8R/fR/2Gn1F5Jju//o 8B29PFH6vnC4bpBCzba18wgr00Tu6kC3dwKiub+7PXa1rYbGf1zel0941jjZX8nNpBqNxO cJ7GJZ8O3WRdjcLGMrXgeBwmQj9sxeSf0wWPVCOI1aAjtNxoD4C70FlVFTZmaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736824960; a=rsa-sha256; cv=none; b=hXQMGywBdONTsVpCYv/ni1j7eLXRq9IjnpcPXF2u/Qgax0TnKKfjHkSAcg+rR+PRPsBBFA No6TG6FDsXA17WLke3Sm9oeVhFRIEMFc2Uy9OdjFj8vRJrzZ/Amuhe1YmwlG5LoEoio78E oFRwtht2R9bnUshnR84WwEOm72UNsJYea2qeErZyadZrqaaYhE8S063FsuwZMWW+yED6R8 nbW5at67U8n2iuHwDF0df6ys35cMxteeiR6TOsCCAIlHxgvexVioIPaCAGIj0lr6AAxlxd JtCdo7BGbjvLWN341GrWmptkRI0BFl/9np0/yqv/dgVXpEvWoISkdQWe0LGAug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: by freefall.freebsd.org (Postfix, from userid 1033) id E404AF66F; Tue, 14 Jan 2025 03:22:39 +0000 (UTC) Date: Tue, 14 Jan 2025 03:22:39 +0000 From: Alexey Dokuchaev To: Justin Hibbits Cc: Abu Hussain Al Mukhtar , freebsd-ppc@freebsd.org Subject: Re: Netbooting an xserve G5? Message-ID: References: <20250110142044.0fa100b5@ralga.knownspace> List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250110142044.0fa100b5@ralga.knownspace> On Fri, Jan 10, 2025 at 02:20:44PM -0500, Justin Hibbits wrote: > Is this an SMP XServe, or a single CPU? If SMP, you can try disabling > SMP with "kern.smp.disabled=1" at loader prompt, and see if that > improves things. It sounds counter-intuitive, but if there's a bug in > the clock sync that could explain the problem. I recall a PR opened > about something related. I guess it is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271826. Yeah, would be really nice to track this bug down and fix. Maybe now with Abu Hussain hitting it as well there'd be some progress. ./danfe From nobody Tue Jan 14 17:58:22 2025 X-Original-To: freebsd-ppc@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 4YXcLj34vkz5kDc7 for ; Tue, 14 Jan 2025 17:58:37 +0000 (UTC) (envelope-from abuhussain@secure.mailbox.org) Received: from mxtls1.mailbox.org (mxtls1.mailbox.org [80.241.60.213]) (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 "*.mailbox.org", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YXcLj0yKgz45Y4; Tue, 14 Jan 2025 17:58:36 +0000 (UTC) (envelope-from abuhussain@secure.mailbox.org) Authentication-Results: mx1.freebsd.org; none Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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) (No client certificate requested) by mxtls1.mailbox.org (Postfix) with ESMTPS id 3C2EC41B1F; Tue, 14 Jan 2025 18:58:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secure.mailbox.org; s=mail20150812; t=1736877507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jb7+aAC00yKtdfSWxGpuk30OLX97XFKt5MzG3X5CEss=; b=IDcJiKULDnGNPlOOHYCBUlRnpiEnQq7qArmPM3BUG250J4wNLZD/FFoQmI9wVG1+WYEK70 Vi02rZChtN7Nbdfm9J4xq0GaF9PQfwk5WRS/O8x9H/tH1Dvc0S7NtUi4sQ4X32wnz0BosK gdlIpj5jiMe8vKMAQdh0ljOtkWWS7v7owtyxAftjFHwPs6DQ+DIIAC6EmfrEje4+hB30L0 KFOkYgN/ChTg5D5+zxs30RXvNjep5ZxFhVFlfYar/V0OJSfLr4Ms4A6HqE+CVnZ89PnTtY RMCCA3M2IVmkiKqw7gvb7FmFH2c0csD5akn2KnqJ2tV4xwj+DWfNdt1IKqTTyQ== Date: Tue, 14 Jan 2025 17:58:22 +0000 From: Abu Hussain Al Mukhtar To: Alexey Dokuchaev Cc: Justin Hibbits , freebsd-ppc@freebsd.org Subject: Re: Netbooting an xserve G5? Message-ID: References: <20250110142044.0fa100b5@ralga.knownspace> List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4YXcLj0yKgz45Y4 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:199118, ipnet:80.241.60.0/24, country:DE] Hi Alexey, * Alexey Dokuchaev : > On Fri, Jan 10, 2025 at 02:20:44PM -0500, Justin Hibbits wrote: > > Is this an SMP XServe, or a single CPU? If SMP, you can try disabling > > SMP with "kern.smp.disabled=1" at loader prompt, and see if that > > improves things. It sounds counter-intuitive, but if there's a bug in > > the clock sync that could explain the problem. I recall a PR opened > > about something related. > > I guess it is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271826. > Yeah, would be really nice to track this bug down and fix. Maybe now > with Abu Hussain hitting it as well there'd be some progress. That would be awesome! Whenever there is progress, I can thoroughly test the snapshots and report back - I can only help with testing, I am not fluent in C and even less in the context of kernel development. Thanks again and BR.- > > ./danfe > From nobody Sat Jan 18 18:35:52 2025 X-Original-To: ppc@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 4Yb4zw5XmVz5khxr for ; Sat, 18 Jan 2025 18:35:56 +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 4Yb4zw2T0bz430H for ; Sat, 18 Jan 2025 18:35:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737225356; 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=RYjK8VTm8zeD9gzh5PUkYJ6Bav+dMtdSR+ZsCeFbdNY=; b=FiQB0llqALqafU5zwqF70GwblRzXqLfUVfwo9uQRZHSFaKV7EkabDZrOnZABU1o526Ioz/ jB+syBGbDtjnXX3BMH+2cfGSuVw0/Fz9IZ145QTo4cp2myOhNK+mL2w8FOGGcB1OGzpD1H Kbl767SMRREPNrL+C/6yvXqH3s0DuT/mQq9xy1VtCnIysRzgN8Ri8S4o3o90y9Iu+/FOOP ZUZmSmvfFgZlks55h4jsifSUyMKbdpA3+TOzwUxml6AKfYOS+XQcI2jEXuZcrOeoqXMky7 fA51V0v2sEUyt4TuUWD+V+0G+Ye8pkG9HDiTGr5eh8QWwUgHCzqGToAFR1UKew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737225356; 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=RYjK8VTm8zeD9gzh5PUkYJ6Bav+dMtdSR+ZsCeFbdNY=; b=D1XEyzUIzh19WCFITQbVmtzvy/iid6BS6jrkqxMcGOSlS7mgZzPdQ2ffdzvGlJGTc/ZrP/ QaXWflUwiP21/l4KsZXwyfPittuuLEBtbSBuzlC4+wmOXZlw+f8k8VItCFtDkfoPrCLOfP SQ3XvLwjYTcv/LfsUWmnBoX7br09NwbbjA85Lz9G+w9t7Ff3UY9xkmjDjyI2vsWqgjFIPw lNPIyJV+5efxM0UnRKQO8+Dh/04f3Jyk/OYkH7nK3VrePt+PbUvaMEECl+76S4ipno6cQw BcITGvNWGO7KEPRij4kACHD1bd1Bks0oK6cWtA6gAHTy2m5lGQDXnqndp68Uhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737225356; a=rsa-sha256; cv=none; b=tZgBZuEhBhpFpVIJsfp0DMm0UIdEH/bvb7e2UDrmHUdZIuoKY342TyK6oOuOWOLyma8/4A kGKWtQRSyotvx6tTMOBELGXwBmD9IdhVuDLee9Q3URjdritL57Whgh34yEM890RSVrip5f RvKRpjfC0Syccz91HGEGyyPExtbklHWa6CYf5w+qB5hDh3+uIxkI33GoRoIS5JHlxAyUhV MuilZFr+56KeYoBwVMnuE8KYKTt7jC3hrb52vuvSRYKBNg+Vioc2Chu3RRi4Yf7JBPU1is Oxia1IySceLg0UA2Xga6FtIbhTShVSzKWHfmAi9M/cg7gY584S0wxx2wgAfv6g== 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 4Yb4zw1wVmz1NL for ; Sat, 18 Jan 2025 18:35:56 +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 50IIZunT055642 for ; Sat, 18 Jan 2025 18:35:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50IIZugP055641 for ppc@FreeBSD.org; Sat, 18 Jan 2025 18:35:56 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: ppc@FreeBSD.org Subject: [Bug 235751] Failure to init TLS variables with func ptr inside shared lib Date: Sat, 18 Jan 2025 18:35:52 +0000 X-Bugzilla-Reason: CC 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: rep_platform version Message-ID: In-Reply-To: References: 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: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 Dennis Clarke changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|powerpc |amd64 Version|12.0-RELEASE |14.2-RELEASE --- Comment #6 from Dennis Clarke --- (In reply to Mark Linimon from comment #5) Seems yes on AMD64 and also on IBM POWER9 ppc64le. ******************* tests ************************** [1] test on AMD64 with FreeBSD 14.2-RELEASE hydra$ uname -apKU=20 FreeBSD hydra 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64 amd64 1402000 1402000 hydra$ freebsd-version -kru=20 14.2-RELEASE 14.2-RELEASE 14.2-RELEASE hydra$ which cc /usr/bin/cc hydra$ CC=3D/usr/bin/cc hydra$ export CC hydra$ $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-freebsd14.2 Thread model: posix InstalledDir: /usr/bin hydra$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o t1.so -fPIC t1.c hydra$ echo $? 0 hydra$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o foo t2.c t1.so hydra$ file foo foo: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, for FreeBSD 14.2, with debug_info, not stripped hydra$ 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 hydra$=20 hydra$ ./foo Segmentation fault (core dumped) hydra$=20 hydra$ LD_LIBRARY_PATH=3D`pwd` ./foo Segmentation fault (core dumped) hydra$=20 hydra$ TERM=3Ddumb LD_LIBRARY_PATH=3D`pwd` gdb ./foo GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD] Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd14.1". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./foo... (gdb) run Starting program: /home/dclarke/tls/foo=20 Program received signal SIGSEGV, Segmentation fault. Invalid permissions for mapped object. 0x0000000001021000 in ?? () (gdb) where #0 0x0000000001021000 in ?? () #1 0x0000000000000000 in ?? () (gdb) quit A debugging session is active. Inferior 1 [process 14818] will be killed. Quit anyway? (y or n) y With or without the debugger we still get a SIGSEGV : hydra$ TERM=3Ddumb LD_LIBRARY_PATH=3D`pwd` ./foo Segmentation fault (core dumped) hydra$=20 ************************************** [2] 15.0-CURRENT on AMD64 :=20 titan$ uname -apKU FreeBSD titan 15.0-CURRENT FreeBSD 15.0-CURRENT #5 main-n274856-488660360a7= 1: Sat Jan 18 17:03:26 GMT 2025=20=20=20=20 root@titan:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 amd64 150= 0030 1500030 titan$=20 titan$ CC=3D/usr/bin/cc titan$ export CC titan$=20 titan$ $CC --version FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2) Target: x86_64-unknown-freebsd15.0 Thread model: posix InstalledDir: /usr/bin Build config: +assertions titan$=20 titan$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o t1.so -fPIC t1.c titan$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o foo t2.c t1.so titan$=20 titan$ file foo foo: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, for FreeBSD 15.0 (1500030), with debug_info, not stripped titan$=20 titan$=20 titan$ 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 titan$=20 titan$ ./foo Segmentation fault (core dumped) titan$=20 titan$ LD_LIBRARY_PATH=3D`pwd` ./foo Segmentation fault (core dumped) titan$=20 titan$ TERM=3Ddumb LD_LIBRARY_PATH=3D`pwd` gdb ./foo GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD] Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd15.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./foo... (gdb) run Starting program: /home/dclarke/pgm/bw/in_progress/tls/foo=20 Program received signal SIGSEGV, Segmentation fault. Invalid permissions for mapped object. 0x0000000001021000 in ?? () (gdb) where #0 0x0000000001021000 in ?? () #1 0x0000000000000001 in ?? () #2 0x00007fffffffec70 in ?? () #3 0x0000000000000000 in ?? () (gdb) quit A debugging session is active. Inferior 1 [process 5060] will be killed. Quit anyway? (y or n) y titan$=20 *********************************************************** [3] 14.2-RELEASE FreeBSD on powerpc64le scotty$=20 scotty$ uname -apKU FreeBSD scotty 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC powerpc powerpc64le 1402000 1402000 scotty$=20 scotty$ sysctl hw.model hw.model: IBM POWER9 scotty$=20 scotty$ CC=3D/usr/bin/cc scotty$ export CC scotty$=20 scotty$ $CC --version FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67) Target: powerpc64le-unknown-freebsd14.2 Thread model: posix InstalledDir: /usr/bin scotty$=20 scotty$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o t1.so -fPIC t1.c scotty$ $CC -std=3Diso9899:1999 -pedantic -pedantic-errors -m64 -g -O0 -fno-builtin -shared -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_REENTRANT -o foo t2.c t1.so scotty$ file foo foo: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, OpenPOWER = ELF V2 ABI, version 1 (FreeBSD), dynamically linked, for FreeBSD 14.2, with debug_info, not stripped scotty$=20 scotty$ 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 scotty$=20 scotty$ ./foo Segmentation fault (core dumped) scotty$=20 *********************************************** other systems and compiler tools *********************************************** For the sake of a comparison I will change the return value to 42 and do the same test on a Solaris 10 SPARCv9 Fujitsu server using an entirely different set of tools :=20 hubble $ uname -a=20 SunOS hubble 5.10 Generic_150400-67 sun4u sparc SUNW,SPARC-Enterprise hubble $=20 hubble $ echo $CC /opt/developerstudio12.6/bin/cc hubble $=20 hubble $ $CC -V cc: Studio 12.6 Sun C 5.15 SunOS_sparc 2017/05/30 hubble $=20 hubble $ cat t2.c /* as seen at * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 */ struct s_t { int (*func)(int); }; extern struct s_t __thread x; int main(int argc, const char *argv[]) { return (*x.func)(argc+41); } hubble $=20 hubble $ echo $CFLAGS -m64 -xarch=3Dsparc -g -xO0 -mc -xs -errfmt=3Derror -erroff=3D%none -errsho= rt=3Dfull -errtags=3Dyes -errwarn=3D%none -ftrap=3D%none -xbuiltin=3D%none -xildoff -= xlibmieee -xstrconst -xcode=3Dpic32 -xmemalign=3D8s -xnolibmil -xunroll=3D1 -xdepend -xregs=3Dno%appl -xdebugformat=3Ddwarf hubble $=20 hubble $ echo $CPPFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600 -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO hubble $=20 hubble $ $CC $CFLAGS -G $CPPFLAGS -D_REENTRANT -o t1.so -h t1.so t1.c hubble $ file t1.so t1.so: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped hubble $=20 hubble $ $CC $CFLAGS $CPPFLAGS -D_REENTRANT -o foo t2.c t1.so hubble $=20 hubble $ elfdump -delv foo | grep -E 'NEED|NAME|PATH' [0] NEEDED 0xe3 t1.so [1] NEEDED 0xd0 libc.so.1 [4] RUNPATH 0xe9 /opt/bw/lib [5] RPATH 0xe9 /opt/bw/lib [12] VERNEED 0x1000007a8=20=20=20=20=20=20=20=20=20 [13] VERNEEDNUM 0x1=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 hubble $=20 hubble $ ldd foo t1.so =3D> (file not found) libc.so.1 =3D> /lib/64/libc.so.1 libm.so.2 =3D> /lib/64/libm.so.2 /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2 /platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1 hubble $=20 hubble $ LD_LIBRARY_PATH=3D`pwd` ./foo hubble $ echo $? 42 hubble $=20 So that seems to work there. Here is an IBM POWER9 server with the IBM XLC compiler :=20 dax$ uname -a=20 Linux dax 6.1.118-mrw1 #1 SMP Sun Nov 17 22:40:36 PST 2024 ppc64le GNU/Linux dax$=20 dax$ CC=3D/opt/ibm/xlC/16.1.1/bin/xlc dax$ export CC dax$=20 dax$ CFLAGS=3D'-qlanglvl=3Dstdc99 -O0 -g' dax$ export CFLAGS dax$=20 dax$ CPPFLAGS=3D'-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_XOPEN_SOURCE=3D600' dax$ export CPPFLAGS dax$=20 dax$ $CC $CFLAGS $CPPFLAGS -D_REENTRANT -shared -fPIC -o t1.so t1.c dax$ file t1.so=20 t1.so: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), dynamically linked, with debug_info, not stri= pped dax$=20 dax$ $CC $CFLAGS $CPPFLAGS -D_REENTRANT -o foo t2.c t1.so=20 dax$ ldd foo linux-vdso64.so.1 (0x00007fff83650000) t1.so =3D> not found libgcc_s.so.1 =3D> /lib/powerpc64le-linux-gnu/libgcc_s.so.1 (0x00007fff835e0000) libm.so.6 =3D> /lib/powerpc64le-linux-gnu/libm.so.6 (0x00007fff834b= 0000) libc.so.6 =3D> /lib/powerpc64le-linux-gnu/libc.so.6 (0x00007fff8320= 0000) /lib64/ld64.so.2 (0x00007fff83660000) dax$=20 dax$ LD_LIBRARY_PATH=3D`pwd` ./foo dax$ echo $? 42 dax$=20 I have not bothered to look on RISC-V yet. --=20 -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken --=20 You are receiving this mail because: You are on the CC list for the bug.= From nobody Sun Jan 19 00:38:55 2025 X-Original-To: ppc@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 4YbF2l4bvZz5l6KD for ; Sun, 19 Jan 2025 00:38:55 +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 4YbF2l3xJHz3cc0 for ; Sun, 19 Jan 2025 00:38:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737247135; 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=YRsCb65SJQVKaSdqQ/tHkgwm5yTe10ON+nTea/hvxTk=; b=jAu+uEwMTHq1hpUiOzmlZUQ2fF8uUem2GY/xm1mmCpTlk8tc8UUX24Oqc8N+Ce3/e6lpnz e1BEHPKogMCBSlWR4luIgSIctB6+IVu2bbZLdtCu4suL7XURqgwuN5WI7j0W8Th3qFENgA D2kPakloPYP/aF3v6v+aOx3C2ePfVumRkv+BB7wEZPBgULfNeJskB0DIe9Oaz6A458yc5B PB1Z/J+THjgZ6CUkD8voHMaWv7ehHlSlTf0A1Q2wl4DLiaoBV8SV1VW0QO2XcTIa2r9lwL kythd6fnT5OM3ONkMjCZJmXOLhpjKNQGZhAEjXwLMeeSMFbMBOVBHbx3ukCk4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737247135; 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=YRsCb65SJQVKaSdqQ/tHkgwm5yTe10ON+nTea/hvxTk=; b=s4TXKwEfXVp0lYt5nnPJIntH6kVe5ZP6E7k1/vSpKRs7/ECRzr6yFSJl4iHIpfGGarKLPv zcB1Kw31rrcA7ZrBZgMx8oTc7tAIS8xQHvdS12WWJ0JveKQmAa8CZgisWpsjJrpbaPE4vi m7ggbSFfaSEhSmDHHo+Jv5n/jL+iLAJuS2RSR0xNI48zeWwpeJIHVJC56m2of6K0ZHN9bw hTEZujEtMC8jubu/QeQal49mNu01zLBDa/N3799Rz3jUyDvX9ZNrUWMMFvoYw4Fwwz7vFp v2+XRFG+N6Pl2PHfnrK7DNJxDAVERbi+ogMuy5oPZGAYnwtJkQubUrfPqvukZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737247135; a=rsa-sha256; cv=none; b=hPMCSoDU442qtV4DjDxINXlf6EwIbWAgREMpz9H/TTl1L/fz0jbClY8QQb9ZcnYIYspr20 Xq7f/eXryHPk++ve9/S66Ddf98HP2llFFhvzNMoRWG4lJFsN6qyFrSYwt7rf1Yd/1i4Vgw nZjWu3/uwRigbWILLBPUEdw+Xr7rbxubdTxqpG/ArEbixzyY4m0C99nu5ze8wC1k3zjdqG GkkAwXa2Ly7ZCL3tT7tYVbYlxXcCwOLkEfaqKomst7TdwP+Xs/OSaQ9fFZp6Pxm4c4crwq 8/yyryTo+xWuW0XLBS6UxIqN8q/na53V8w514sGGF2cliEhWkIOQhOnzc29Utw== 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 4YbF2l3XMczBRd for ; Sun, 19 Jan 2025 00:38:55 +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 50J0ctBM001096 for ; Sun, 19 Jan 2025 00:38:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50J0ctZk001095 for ppc@FreeBSD.org; Sun, 19 Jan 2025 00:38:55 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: ppc@FreeBSD.org Subject: [Bug 235751] Failure to init TLS variables with func ptr inside shared lib Date: Sun, 19 Jan 2025 00:38:55 +0000 X-Bugzilla-Reason: CC 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: kib@FreeBSD.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: cc Message-ID: In-Reply-To: References: 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: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #7 from Konstantin Belousov --- (In reply to Dennis Clarke from comment #6) Works for me on amd64 stable/14: solo% LD_LIBRARY_PATH=3D. ./foo 1 2 3; echo $? 4 Base clang 19.1.4, but I suspect it should not matter. And indeed same res= ult when the test dso and program are compiled with gcc 14.2. Also worked for i386 (-m32). --=20 You are receiving this mail because: You are on the CC list for the bug.= From nobody Sun Jan 19 16:20:13 2025 X-Original-To: ppc@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 4Ybdwt4xYhz5lR1F for ; Sun, 19 Jan 2025 16:20:14 +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 4Ybdwt3C0Nz3j6x for ; Sun, 19 Jan 2025 16:20:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737303614; 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=TrgT9dSOFgvRHHqoJHIIiKHA6xKrg0KVt235URLfuMc=; b=Aiz2Pqyk7jQ95egqOUAlewuYcWOFx62TZWk+blq1bJ5LAcLNbwDbwvmiTEQmNDrE7D0siD TV7ZBy2zkBiYL0rY9pdk6yYSKnz94hNiWKi1S9QKvimzih0f+amd7Xuy1e8r9ecfPLyHif JcyxUNXbi77ySjuIuIOp2jL7C2HmNd4FExSV0tu2PnCnxfoJ3z7b7+Rbccs8PlP7RK+bIp 5x9xyttzrwNNLzSZFtPO5WXbAIVGYcckPTexwss+ExDSUe9LjDWG5+bs5+jGnBkQzPfq08 XqzKm+kP2tEmrSS0moEQLj6y/yLADCyLPZskOhHdIlr+lqlNNm9KGs1JkeD0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737303614; 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=TrgT9dSOFgvRHHqoJHIIiKHA6xKrg0KVt235URLfuMc=; b=kU5XY9wA4S3UyuH/4tmASpVfAMI2fm0Dm/dk2UGRNeZ5AL55ySTLx83lg1WprhFRdnsRpC neRM32VCShQ7v+nJQpnMdl4hzXz3O+9n+DKnmxAckpbjqKwZVV99V/b9e5pQQrI7qF6wnm SiSJxwOWzqPiLFs/5+opD+mKGhKXZwi8BGjDkbS4+FHzWHhLQEmfzbkiAcEM2PC/6eKKKn eZiJPFE6eN/93Zp0OTARiwRnHMDIeeZz80pyrb/NHBjEzl+L5Hk7HByRcYoqS1PwoSqe3i aN5PVJA0xawvU/7D9OeVtAoI52bGVuwd2yx2rho3HXWAzNX5IQIV3XaWUoRJoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737303614; a=rsa-sha256; cv=none; b=dl/vHOTXed7QC2x23RPEvbn4oLOefpCu8C8pkdqptVsuaW6YB14ty1yGWwK9WTRzTXcqyG jf+1pdhzE7Z08oUyFmvhd1lM7AkkGh5DDM4+I9WgKBW96z6XBmddKR17v9WSH4PbELCHLX Li4Z5o1QXCYs0aL9PmR8+7kJ8nyFs/YeqWy8/CTyy16CNrpi2W52+TDSwly5YagWd/WZCg UtunfHZqhe5PppWcCfHCKg1MyhzqjQHa8/Pvt4pguuiDP09W36zSm3CM9EMuKEXETPPfJk 3FNkVUb8FIZb6BZWpr5QA4A70MtGZ1xQf3E7d8oxjU5tXnOS0kXGPwhTHCP5rg== 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 4Ybdwt2Wh9zxQh for ; Sun, 19 Jan 2025 16:20:14 +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 50JGKE1A078397 for ; Sun, 19 Jan 2025 16:20:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50JGKEeM078396 for ppc@FreeBSD.org; Sun, 19 Jan 2025 16:20:14 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: ppc@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: CC 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: In-Reply-To: References: 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: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 --- Comment #8 from Dennis Clarke --- (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 on the CC list for the bug.= From nobody Sun Jan 19 22:12:55 2025 X-Original-To: ppc@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 4Ybnlr0DgTz5lmv5 for ; Sun, 19 Jan 2025 22:12:56 +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 4Ybnlq58wKz3HvK for ; Sun, 19 Jan 2025 22:12:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737324775; 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=YUGceVD/2oACvnelcZc3gJ/zaOTANuiM4+ocsCtWbeo=; b=gzu9H3+Imi8abnde9CUgOfyjcp1IKUBnj/PVi/2/GlhhFBbataq3cYgttiDPYgirtKO3K1 jbySrjkSbcTiFQB+sx78kg4KiswEVvhRskQvkbpQClQNC3b7VKWPXW/plgDrs9X6mBlA+A ihVuF+by7TxOVI7Me6HdrU+UkkdnIc7HMcM5sVnCWrhg8zHoxV5TsDQeICdslEa2VUf4Yg 2f6MlWenOJkP7I2uwGw7bxyP9bD4V13OHJ+qCNXEToSYS8Dq/HZALhbU8LtQH/Dk3MRiUj q6mehSrtBEW4G8q1/kg2M+nc25PKlnWLU4LWOfva1XutLCRrlgD+t9ZG/fvJfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737324775; 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=YUGceVD/2oACvnelcZc3gJ/zaOTANuiM4+ocsCtWbeo=; b=Bhm6XYCmTwSeiENEdsW/V5ExcWedSCDjYvI427kZD3VFd4auEprfhEPwWwR9QV5bdJQvCP W9+oECVVgZ78eebo5Kxld+kePbCp0AyqAW0vYeRqeG0uo3+ojF1cc1RXUKxtQeEtC5sNgb 7qMMEdOXm9mK1av2KcPmki1jSRxKEAaT+8Gag7BWMUwJUvWW8GerOodCVDPRWL13aSJElh GHQPVlMVct6G2/h4P4f52YDnT1HbVdpNoVFP9mTXHVq1izFw5ToO8QxH6RxlSStNY5sTFW Uz2e7RXiciZdX94cYjenJweDwVQ9epyfIu+xP0OC+snf7ROoSR2ipOtB5ooWqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737324775; a=rsa-sha256; cv=none; b=wyU/r9eacjsEAOG79W5JR5LEONL6YJOTI2Umhn87pQPnuao1IZJjrmlFxoBgwMY292cYyO FOqRHaVyDd4ACjxTVtzbx7jANHWQ2EtfHkvVNwnA8v3ABz2kgeTIKMwZaBnhPkMD0Lgik7 A6ZTKLtsiv+TeQBoP+yCuglVEB6OBZuaCbUm1oudnSfNqZzNWASazBRzaOjFUvpzssvo0m TmAovufOOwWJ2hso3pdtEO+np2YhqdXLltQTlUcYL3RY8VFOLstC33I4KnQNAfUTq+DGrY ubtx3nm5qNw9ynG3P+zwbUmQduKbJLXpSakLd5lD0lnASbhuKyytOHoDkN2L3w== 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 4Ybnlq4l9lz177P for ; Sun, 19 Jan 2025 22:12:55 +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 50JMCtT0001403 for ; Sun, 19 Jan 2025 22:12:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50JMCtUu001402 for ppc@FreeBSD.org; Sun, 19 Jan 2025 22:12:55 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: ppc@FreeBSD.org Subject: [Bug 235751] Failure to init TLS variables with func ptr inside shared lib Date: Sun, 19 Jan 2025 22:12:55 +0000 X-Bugzilla-Reason: CC 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: kib@FreeBSD.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: In-Reply-To: References: 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: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 --- Comment #9 from Konstantin Belousov --- (In reply to Dennis Clarke from comment #8) I did no magic. Attached is the archive with the test programs I edited out of your first message, and resulting binaries, that worked for me. --=20 You are receiving this mail because: You are on the CC list for the bug.= From nobody Sun Jan 19 22:13:34 2025 X-Original-To: ppc@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 4Ybnmb5ZHmz5lnHm for ; Sun, 19 Jan 2025 22:13:35 +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 4Ybnmb2VfWz3JQ3 for ; Sun, 19 Jan 2025 22:13:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737324815; 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=8bFj18UHymgkQOOpeB/30OXFz8o51/q6pB73e0MNPWI=; b=lQT5hTnwjCQ/YZKAhCP7XIOQv2ndj+2EvLm74nm0TF+mBqUONFPwonkfipSvoQrYy6QxP5 3/Hoeo0UjKgKMjLI0uGmNLtLqMWHyjhUBi13ItJ8iV2rjK+y/MuR2CE8WvB8bWVNgyRapT 7jHbRh9l1+7v5V78wbIOYRg6EVZqc0Upv5jWEp5X2uO7EK+XCkPfleD2hwDaUNxkfprwdj 2SpZ4deuvk+9TiwJYq9ugBIbmtG8Wax370wIrGZLeffzbzCsfatqHBxkfUnyIKZWywX2AI 3mRnxWzmRMB5nXSTVNbXxMH/xw5KZPkb7BhUpLpS4u1OhWqExp7WGfY5E8Oc+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737324815; 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=8bFj18UHymgkQOOpeB/30OXFz8o51/q6pB73e0MNPWI=; b=cGCjQZarvrvbFRR/5IBLCuUdtfkbf59G8eoOa0kH4HzvMXskhzQ32lmNNSVs7Uyh9B1YY4 w/ksOCyVJrArAlaASYfAzf9Heb/KmSzX02MrJNioU3fuOnE3EYAGKhY2TYpL4j6acFXhDF +ltXsfmMDzS75WS5Mq2PPDgKKRSJw4iPslFjgzX/S6YrObgNNN7+8ramMhPFCI5TeiGVIT PFWnJLbziVZIxqMPi/B/4x7coaZg/3HA+qlbEh2UGr+RB8tumuoNqCjGENzvKuQvb6yIHT 1ZeeJbD25kIx6LGrOswMHH8nG1EQsC9nWezIsiJxunGCP8f4PShpJw/NwIHLxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737324815; a=rsa-sha256; cv=none; b=iGjkK0Wb9FHj87B1SYQD55hbbSnbwy0wLXCQfeHuEtLEEKU0CEbgr9ePnFkJHF/MDrdtoT g+okxVP82kU2dclAcQ3iML0WSkWQ98k15nBZ111izfJ5yYqdHSYyTOCG9qmwkvytoiO2CE G6GAH/6GyaGwanfw5QqOONna+FTpEXm3SFF86TLQk6niYV0pTc9H7oJG47IdPHV4GRmf7m yIh0E3SNyu7jM4xFrWtlCYC7bhF2ei14mkBYu2u0H3WyEoePBjvXjVyrikGfmZ9vEJmt3/ Y7u4JQAwj8/INJ7ADaZxMHLozDVUFCNuDgwJTQcLc+++jOv2WOJIOpWyEUTGog== 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 4Ybnmb25Dcz17n4 for ; Sun, 19 Jan 2025 22:13:35 +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 50JMDZ61001939 for ; Sun, 19 Jan 2025 22:13:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50JMDZQg001938 for ppc@FreeBSD.org; Sun, 19 Jan 2025 22:13:35 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: ppc@FreeBSD.org Subject: [Bug 235751] Failure to init TLS variables with func ptr inside shared lib Date: Sun, 19 Jan 2025 22:13:34 +0000 X-Bugzilla-Reason: CC 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: kib@FreeBSD.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: attachments.created Message-ID: In-Reply-To: References: 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: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235751 --- Comment #10 from Konstantin Belousov --- Created attachment 256824 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D256824&action= =3Dedit test dir with src and binaries --=20 You are receiving this mail because: You are on the CC list for the bug.=