frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Clang: -Wexperimental-lifetime-safety: Experimental C++ Lifetime Safety Analysis

https://github.com/llvm/llvm-project/commit/3076794e924f
2•matt_d•4h ago

Comments

matt_d•4h ago
Background:

https://discourse.llvm.org/t/announcing-the-lifetime-safety-...

Lifetime Analysis: Current Status

> For those not already familiar, we’re working on a new lifetime analysis in Clang to catch issues like use-after-scope or returning pointers to stack memory. The analysis is alias-based and draws inspiration from Rust’s borrow checker (specifically, [Polonius](https://smallcultfollowing.com/babysteps/blog/2018/04/27/an-...)). More details in the RFC: https://discourse.llvm.org/t/rfc-intra-procedural-lifetime-a...

> The initial implementation targets intra-procedural analysis for C++ raw pointers. This keeps the surface area small while we iterate. Over time, we aim to enable this analysis by default in Clang, with both “permissive” and “strict” modes to balance noise and coverage.

Key Components

- Conceptual Model: Introduces the fundamental concepts of Loan, Origin, and Path to model memory borrows and the lifetime of pointers.

- Fact Generation: A frontend pass traverses the Clang CFG to generate a representation of lifetime-relevant events, such as pointer assignments, taking an address, and variables going out of scope.

- Testing: llvm-lit tests validate the analysis by checking the generated facts.

Example:

[LifetimeSafety] Introduce intra-procedural analysis in Clang

Commit: https://github.com/llvm/llvm-project/commit/3076794e924f

PR: https://github.com/llvm/llvm-project/pull/142313

Test source code: https://github.com/llvm/llvm-project/blob/3076794e924f30ae21...

Nvidia CEO on whether AI will lead to job losses [video]

https://www.cnn.com/2025/07/13/business/video/gps0713-ai-workforce-nvidia-productivity
1•breadwinner•1m ago•0 comments

Remembrance of Scents Past

https://www.newyorker.com/culture/onward-and-upward-with-the-arts/remembrance-of-scents-past
1•prismatic•5m ago•0 comments

Becoming Indigenous: Identity and Heterogeneity in a Global Movement [pdf]

https://www.researchgate.net/publication/289959178_Becoming_indigenous_Identity_and_heterogeneity_in_a_global_movement
1•thunderbong•6m ago•0 comments

Ask HN: How is my MacBook temp getting misread?

1•GWBullshit•7m ago•0 comments

Measuring the Impact of AI on Experienced OSS Developer Productivity [pdf]

https://metr.org/Early_2025_AI_Experienced_OS_Devs_Study.pdf
1•nreece•12m ago•1 comments

C++ Coroutines Advanced: Converting std:future to asio:awaitable

https://www.ddhigh.com/en/2025/07/15/cpp-coroutine-future-to-awaitable/
2•xialeistudio•18m ago•1 comments

A new open-source social network

https://vapr.club
2•victoradventure•32m ago•0 comments

Simulating Time with Square-Root Space

https://arxiv.org/abs/2502.17779
2•felineflock•33m ago•0 comments

California's beer tax compares to other states

https://www.axios.com/local/san-francisco/2025/07/14/california-beer-taxes
2•bdev12345•36m ago•0 comments

Micronutrient deficiency linked to chronic pain in new study

https://healthsciences.arizona.edu/news/releases/micronutrient-deficiency-linked-chronic-pain-new-study
4•geox•36m ago•0 comments

Stefanie Stantcheva: To understand America today, study the zero-sum mindset

https://www.economist.com/by-invitation/2025/07/07/to-understand-america-today-study-the-zero-sum-mindset-writes-stefanie-stantcheva
3•PaulHoule•38m ago•2 comments

Museum of Failure

https://museumoffailure.com
2•ls-a•40m ago•0 comments

Double Pendulums are Chaoticn't [video]

https://www.youtube.com/watch?v=dtjb2OhEQcU
2•ghghgfdfgh•43m ago•0 comments

Tesla -shaped Robotaxi expansion illustrates how unserious the business is

https://electrek.co/2025/07/14/tesla-penis-shaped-robotaxi-expansion-illustrates-unserious-business/
2•TheAlchemist•43m ago•0 comments

Doge Denizen Marko Elez Leaked API Key for XAI

https://krebsonsecurity.com/2025/07/doge-denizen-marko-elez-leaked-api-key-for-xai/
26•todsacerdoti•44m ago•9 comments

AWS Lambda Silent Crash – A Platform Failure, Not an Application Bug [pdf]

https://lyons-den.com/whitepapers/aws-lambda-silent-crash.pdf
2•nonfamous•46m ago•0 comments

Research shows path toward protocells on Saturn's moon Titan

https://phys.org/news/2025-07-path-protocells-saturn-moon-titan.html
2•pseudolus•46m ago•0 comments

For Algorithms, Memory Is a Far More Powerful Resource Than Time

https://www.wired.com/story/for-algorithms-a-little-memory-outweighs-a-lot-of-time/
2•felineflock•48m ago•0 comments

Spicy – Generating Robust Parsers for Protocols and File Formats

https://docs.zeek.org/projects/spicy/en/latest/index.html
3•signa11•48m ago•0 comments

Mass timber for hospitals: engineered wood resists microbes more than plastic

https://techxplore.com/news/2025-07-mass-timber-elevate-hospital-wood.html
7•PaulHoule•48m ago•1 comments

Pdoc vs. Pdoc3 Controversy

https://github.com/pdoc3/pdoc/issues/64
2•funerr•48m ago•0 comments

Serena and her kingdom invading humanity

https://www.youtube.com/watch?v=KVktLn3X08c
2•EvilDeadlyMice•48m ago•2 comments

The woman who changed our view of chimps – and human beings

https://www.bbc.com/culture/article/20250710-the-woman-who-redefined-chimps-and-human-beings
2•pseudolus•49m ago•0 comments

Trump administration says it won't publish climate change report on NASA website

https://www.clickorlando.com/news/politics/2025/07/14/trump-administration-says-it-wont-publish-major-climate-change-report-on-nasa-website-as-promised/
9•OutOfHere•50m ago•0 comments

Digital Nomads Are Getting Caught in the War on Tourism

https://reason.com/2025/07/12/anywhere/
2•pseudolus•57m ago•0 comments

Toward Science Fiction Education

https://sciencefictiontalk.substack.com/p/toward-science-fiction-education
2•HR01•58m ago•0 comments

Tour de force: Vivaldi and Renault team up for the best on-road experience

https://vivaldi.com/blog/vivaldi-and-renault-team-up-for-the-best-on-road-experience/
2•VicenteJC•1h ago•0 comments

About 1,500 tarantulas found hidden in cake boxes at German airport

https://www.theguardian.com/world/2025/jul/14/germany-tarantulas-customs-cake-bozes
2•noleary•1h ago•0 comments

The Matthew Effect

https://en.wikipedia.org/wiki/Matthew_effect
2•wolfi1•1h ago•0 comments

My Problem with Superman

https://www.nytimes.com/2025/07/10/opinion/superman-movie-immigrant-junot-diaz.html
2•herbertl•1h ago•3 comments