news
Programming Leftovers
-
LWN ☛ Progress on defeating lifetime-end pointer zapping
Paul McKenney gave a remote presentation at Kangrejos 2025 following up on the talk he gave last year about the lifetime-end-pointer-zapping problem: certain common patterns for multithreaded code are technically undefined behavior, and changes to the C and C++ specifications will be needed to correct that. Those changes could also impact code that uses unsafe Rust, such as the kernel's Rust bindings. Progress on the problem has been slow, but McKenney believes that a solution is near at hand.
He began by noting that the obvious way to write an atomic last-in-first-out (LIFO) stack as a linked list in C or C++ invites undefined behavior. Specifically, it can end up creating a pointer that has a valid bit pattern, but an invalid provenance. Imagine that a thread wants to push an item (A) onto a stack; it reads the pointer to the current top of the stack (B), stores that into A's next field, and then uses an atomic compare-and-swap instruction to store the pointer to A as the new top item only if the top-of-stack pointer still points to B.
-
LWN ☛ Julia 1.12 released
Version 1.12 of Julia has been released. Highlights of the release include new multi-threading features, new tracing flags and macros, and an experimental --trim feature.
-
Python
-
Rlang ☛ Python package development for R developers
I’ve learned a lot by developing and contributing to various R packages over the years.
-
Rlang ☛ More data (> 150 files) on T. Moudiki’s situation: a riddle/puzzle (including R, Python, bash interfaces to the game — but everyone can play)
This post contains a riddle/puzzle related to T. Moudiki's situation, including files and code snippets in R, Python, and bash. The ZIP file with a lot of details is available for download.
-
-
Rust
-
LWN ☛ Upcoming Rust language features for kernel development
The Rust for Linux project has been good for Rust, Tyler Mandry, one of the co-leads of Rust's language-design team, said. He gave a talk at Kangrejos 2025 covering upcoming Rust language features and thanking the Rust for Linux developers for helping drive them forward. Afterward, Benno Lossin and Xiangfei Ding went into more detail about their work on the three most important language features for kernel development: field projections, in-place initialization, and arbitrary self types.
Many people have remarked that the development of new language features in Rust can be quite slow, Mandry said. Partly, that can be attributed to the care the Rust language team takes to avoid enshrining bad designs. But the biggest reason is ""alignment in attention"". The Rust project is driven by volunteers, which means that if there are not people focusing on pushing a given feature or group of related features forward, they languish. The Rust for Linux project has actually been really helpful for addressing that, Mandry explained, because it is something that a lot of people are excited about, and that focuses effort onto the few specific things that the Linux kernel needs.
-