News for hackers. Stuff that matters.
Re:Raku: A Language for Gremlins by CodesInChaos on Tuesday August 08, 2023 @07:15AM (#37047264)
I'm not a C language lawyer, but I'd expect C to have a rule that calculating the one-past pointer will not overflow within an array object. So malloc would not be allowed to return such an allocation and this would be a bug in the caller, not in this function.
Re:Raku: A Language for Gremlins by Joker_vD on Tuesday August 08, 2023 @08:29AM (#37047954)
Yes, indeed it does. It's mostly ignored by most implementations but technically e.g. on architectures with 16-bit address space 0xFFFF isn't allowed to be part of an object (which makes 0x0000 an obvious choice for NULL).