Tech News
← Home  ·  All topics

Standard Library

4 GoKawiil briefs on this topic · RSS for standard library

Microsoft FORGE Lab finds memory-safety bugs in Rust's standard library

Microsoft's FORGE Lab used an AI-powered vulnerability scanner called Hyenas, built on its MDASH research system, to find several memory-safety issues in Rust's core and std libraries. The team identified three recurring patterns where unsafe code wrongly trusts other code not to panic, trusts user-supplied implementations to behave correctly, or trusts the underlying system, allowing undefined behavior even in programs written entirely in safe Rust.

C++26 proposal adds native pre/post contract syntax to functions

A technical walkthrough demonstrates how C++26 introduces built-in 'contracts' syntax, letting developers express function preconditions directly in a function's signature using pre(...), rather than relying on assert() calls buried inside the implementation. The example shows a get_value function checking that an index is within a vector's bounds, with the condition visible in both declaration and definition.

GraafHenk releases WangNet, a 1.8MB neural network that judges 'Numberwang'

A developer known as GraafHenk has published an open-source project called Numberwang, built around a tiny 1.8MB JSON model and roughly 100 lines of pure Python with no external dependencies. The tool parses digits, number words, arithmetic expressions, Roman numerals, currencies and more across eleven languages, then returns one of four comedic verdicts inspired by the British sketch of the same name, including 'Numberwang' and 'Wangernumb'. It runs via command line or can be imported directly as a Python function returning probability scores for each verdict.

C++26 adds optional 'hardened' mode to catch standard library errors

C++26 introduces the concept of a hardened implementation for the standard library, where operations like std::vector's operator[] that previously caused undefined behavior on invalid access now trigger a defined contract violation instead—if the implementation enables hardening. The standard leaves it up to each implementation to decide whether and how this hardened mode is turned on.