3 ms·
Unless you were on systems that mapped address 0 to a writable but always zero value so they could do load and store speculation without worry. IBM did this f
by DannyBee 1y ago
Unless you were on systems that mapped address 0 to a writable but always zero value so they could do load and store speculation without worry.
IBM did this for a long time
- deleted 1y ago[deleted]
- mabster 1y agoMy favourite were older embedded systems where 0 was an address you actually do interact with. So for some portion of the code you WANT null pointer access. I can't remember the details but I do remember jumping to null to reset the system being pretty common.
- marshray 1y agoProbably the system interrupt table. Index 0 might reference the handler for the non-maskable interrupt NMI, often the same as a power-on reset. I recall that on DOS, Borland Turbo C would detect writes to address 0 and print a message during normal program exit.
- ghurtado 1y agoRANDOMIZE USR 0
- ncruces 1y agoIn Wasm you can read/write whatever to address zero of linear memory. It's still UB as far as clang is concerned so you C code can do whatever. But it won't “crash” on the spot.