eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

201
active users

#glibc

1 post1 participant0 posts today
openSUSE Linux<p>August’s Tumbleweed updates are great! Kernel 6.16 adds <a href="https://fosstodon.org/tags/RaspberryPi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RaspberryPi</span></a> 5 RP1 support, <a href="https://fosstodon.org/tags/KDE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KDE</span></a> Gear 25.08 improves travel apps &amp; Dolphin, and <a href="https://fosstodon.org/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a> 2.42 brings C23 support. Stay secure, stay rolling. <a href="https://news.opensuse.org/2025/09/02/tw-monthly-update-august/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">news.opensuse.org/2025/09/02/t</span><span class="invisible">w-monthly-update-august/</span></a></p>
GripNews<p>🌘 dlclose 無法卸載函式庫的原因為何?<br>➤ 一場關於動態函式庫卸載的偵錯寓言<br>✤ <a href="https://kishoreganesh.com/post/why-dl-close-did-not-work/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kishoreganesh.com/post/why-dl-</span><span class="invisible">close-did-not-work/</span></a><br>作者在工作中遇到一個棘手的問題,當他嘗試卸載動態載入的函式庫時,`dlclose` 並未如預期般將其完全移除。此問題影響了一個 Rust 函式庫 (libA) 及其 C++ 依賴函式庫 (libB),導致 libB 的初始化失敗,因為它被錯誤地認為已準備就緒。文章深入探討了 `dlclose` 的運作機制,並揭示了 `libstdc++.so` 中的 `STB_GNU_UNIQUE` 符號標記以及函式庫中註冊的執行緒局部儲存 (TLS) 解構器是導致無法卸載的根本原因。作者也分享了透過 `LD_DEBUG` 環境變數和在 `dlclose` 中設定中斷點來進行偵錯的經驗。<br>+ 真是太詳細的分析了!我之前也遇過類似的函式庫載入問題,但從沒想過 TLS 解構器會是罪魁禍首。<br>+ 這篇文章的偵錯思路非常值得學習,特別是 `L<br><a href="https://mastodon.social/tags/%E5%87%BD%E5%BC%8F%E5%BA%AB%E7%AE%A1%E7%90%86" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>函式庫管理</span></a> <a href="https://mastodon.social/tags/%E5%8B%95%E6%85%8B%E8%BC%89%E5%85%A5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>動態載入</span></a> <a href="https://mastodon.social/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a>++ <a href="https://mastodon.social/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a> <a href="https://mastodon.social/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a></p>
Sourceware<p>The next GNU Tools Cauldron, taking place in Porto, Portugal, on September 26-28, 2025.</p><p><a href="https://inbox.sourceware.org/gcc/87o6ubhn4j.fsf@oracle.com/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">inbox.sourceware.org/gcc/87o6u</span><span class="invisible">bhn4j.fsf@oracle.com/</span></a><br><a href="https://gcc.gnu.org/wiki/cauldron2025" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">gcc.gnu.org/wiki/cauldron2025</span><span class="invisible"></span></a><br><a href="https://gnu-tools-cauldron.org/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">gnu-tools-cauldron.org/</span><span class="invisible"></span></a></p><p>Some <a href="https://fosstodon.org/tags/Sourceware" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Sourceware</span></a> Project Leadership Committee members and <span class="h-card" translate="no"><a href="https://social.sfconservancy.org/users/conservancy" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>conservancy</span></a></span> staff should also be there.</p><p><a href="https://fosstodon.org/tags/GCC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GCC</span></a> <a href="https://fosstodon.org/tags/GDB" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GDB</span></a> <a href="https://fosstodon.org/tags/binutils" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>binutils</span></a> <a href="https://fosstodon.org/tags/CGEN" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CGEN</span></a> <a href="https://fosstodon.org/tags/DejaGnu" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DejaGnu</span></a> <a href="https://fosstodon.org/tags/newlib" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>newlib</span></a> <a href="https://fosstodon.org/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a> <a href="https://fosstodon.org/tags/poke" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poke</span></a> <a href="https://fosstodon.org/tags/libabigail" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>libabigail</span></a> <a href="https://fosstodon.org/tags/elfutils" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>elfutils</span></a></p>
datenwolf<p>All I want is just a collection of <a href="https://chaos.social/tags/binutils" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>binutils</span></a>, <a href="https://chaos.social/tags/GCC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GCC</span></a>, <a href="https://chaos.social/tags/llvm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>llvm</span></a>+<a href="https://chaos.social/tags/clang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>clang</span></a>, <a href="https://chaos.social/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a> and <a href="https://chaos.social/tags/musl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>musl</span></a> that are "free standing" / relocatable, which I can pack into a <a href="https://chaos.social/tags/squashfs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>squashfs</span></a> image to carry around to my various development machines.</p><p>You'd think that for something as fundamental as compiler infrastructure with over 60 years of knowledge, the whole bootstrapping and bringup process would have been super streamlined, or at least mostly pain free by now.</p><p>Yeah, about that. IYKYK</p>
Continued thread

Solved! 🥳

This was a pretty "interesting" bug. Remember when I invented a way to implement #async / #await in #C, for jobs running on a threadpool. Back then I said it only works when completion of the task resumes execution on the *same* pool thread.

Trying to improve overall performance, I found the complex logic to identify the thread job to put on a pool thread a real deal-breaker. Just having one single MPMC queue with a single semaphore for all pool threads to wait on is a lot more efficient. But then, a job continued after an awaited task will resume on a "random" thread.

It theoretically works by making sure to restore the CORRECT context (the original one of the pool thread) every time after executing a job, whether partially (up to the next await) or completely.

Only it didn't, at least here on #FreeBSD, and I finally understood the reason for this was that I was using #TLS (thread-local storage) to find the context to restore.

Well, most architectures store a pointer to the current thread metadata in a register. #POSIX user #context #switching saves and restores registers. I found a source claiming that the #Linux (#glibc) implementation explicitly does NOT include the register holding a thread pointer. Obviously, #FreeBSD's implementation DOES include it. POSIX doesn't have to say anything about that.

In short, avoiding TLS accesses when running with a custom context solved the crash. 🤯

glibc (2.41-7) unstable; urgency=medium

Starting with glibc 2.41, shared libraries requiring an executable stack
cannot be dynamically loaded through the #dlopen mechanism from a binary that
does not require an executable stack. This change aims to improve security,
as the previous behavior was used as a vector for RCE (#CVE-2023-38408).
Attempting to do so will result in the following error:

cannot enable executable stack as shared object requires: Invalid argument

While most libraries generated in the past 20 years do not require an
executable stack, some third-party software still need this capability. Many
vendors have already updated their binaries to address this.

If you need to run a program that requires an executable stack through
dynamic loaded shared libraries, you can use the glibc.rtld.execstack
tunable:

Glibc6_TUNABLES=glibc.rtld.execstack=2 ./program

-- Aurelien Jarno <aurel32@debian.org> Sun, 13 Apr 2025 14:41:11 +0200

I have a question related to distributing games on Linux. I'm making a game from scratch with C and the help of some libraries like SDL2 and Libconfig.

I've heard that making "portable" programs is quite difficult on Linux due to Glibc and other things related to libraries. How true is this, and what can I do to work around it? Any information is appreciated.

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Gene Goykhman, Sergey Alexandrovich Bugaev, Wang Diancheng, Warren Thomas Everett Wilkinson, and Xinyuan Zhang for assigning their copyright to the FSF! #GNU #Emacs #glibc #GDB #GNUstep #GNUHurd #GNUMach #GCC Learn more at u.fsf.org/3ht #CopyrightAssignments

www.fsf.orgHow to Assign Copyright — Free Software Foundation — Working together for free software

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Gene Goykhman, Sergey Alexandrovich Bugaev, Wang Diancheng, Warren Thomas Everett Wilkinson, and Xinyuan Zhang for assigning their copyright to the FSF! #GNU #Emacs #glibc #GDB #GNUstep #GNUHurd #GNUMach #GCC Learn more at u.fsf.org/3ht #CopyrightAssignments

www.fsf.orgHow to Assign Copyright — Free Software Foundation — Working together for free software