News for hackers. Stuff that matters.
Re:Sshole by bawolff on Thursday November 05, 2026 @01:24PM (#50382527)
Its kind of cool to see such simple to follow logic bugs instead of usual memory safety issues. Each step made sense in isolation.
Re:Sshole by kibwen on Thursday November 05, 2026 @01:44PM (#50382782)
The terrifying decision for the API to return "*" on failure is a second-order consequence of memory unsafety, because it was a half-baked attempt to mitigate a common source of UB that people were encountering in the wild.
Re:Sshole by bawolff on Thursday November 05, 2026 @01:49PM (#50382835)
i'd say it is more a consequence of not having exceptions or other way of being explicit about error values.
Re:Sshole by kibwen on Thursday November 05, 2026 @03:14PM (#50383876)
That was a contributing factor, but there are plenty of other instances of C APIs that make use of in-band signaling like this. That the API was changed from returning one in-band signal to another is because the original value was causing programs to crash unpredictably due to UB.