tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NULL pointer arithmetic issues

> On Feb 24, 2020, at 4:22 AM, Kamil Rytarowski <> wrote:
> A compiler once being smart enough can introduce ILL/SEGV traps into
> code that performs operations on NULL pointers. This already bitten us
> when we were registering a handler at address 0x0 for the kernel code,
> GCC changed the operation into a cpu trap. (IIRC it was in the sparc code.)

Nonsense, I think it's fair to classify that as a bug.  That sort of stuff is *not* supposed to happen if -ffreestanding is passed to the compiler.

-- thorpej

Home | Main Index | Thread Index | Old Index