Login
You're viewing the discuss.systems public feed.
  • Oct 1, 2026, 2:53 PM

    @atax1a @regehr

    For those missing context:

    AMD GPUs place (placed?) their stack memory at address 0, which meant 0 was a valid memory address. This caused a bunch of problems in LLVM because LLVM assumes that a pointer at address 0 is invalid.

    The C spec is more fun here. An integer constant expression of 0 is a null pointer but an implementation is free to determine that a constant expression that turns into some entirely different bit pattern when compiled. Some mainframes do this and null pointers are not represented as zero.

    For CHERI C we aim to implement most of the 'de facto' C standard (i.e. all of the stuff that C programmers expect, even if the standard says they shouldn't). This includes being able to memset a struct with zero and have all of the pointer fields be filled with nulls.

    💬 0🔄 1⭐ 0