Get the latest tech news

The Defer Technical Specification: It Is Time


After the Graz, Austria February 2025 WG14 Meeting, I am now confident in the final status of the defer TS, and it is now time.

The function in question for CVE-2021-3744 had exactly what Yodaiken wanted: a single exit point after doing preliminary returns for precondition/invalid checks, goto to a series of laddered cleanup statements for the very end, highly reviewed code, and being developed in as real a context as it gets (the Linux Kernel). This usually isn’t a problem, but I’ve had to sit in presentations in real life during my C++ Meetup where the engineers gave talks on standard streams (and many of their boost counterparts) making it impossible for them to have high-reliability file operations. Removing a significant chunk of human error as well as reducing risk during refactors or rewrites because someone might forget to add a goto CLEANUP; or a necessary freeThat() call are tangible, real benefits we can do to prevent classes of leaks.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Time

Time

Related news:

News photo

Plex Raises Premium Subscription Prices for First Time in Decade

News photo

Plex raises subscription prices for the first time in a decade

News photo

Time to ditch US tech for homegrown options, says Dutch parliament