it's always extremely cursed when 0 is valid addressable memory so faults get triggered 2 functions later when the garbage that was fetched from 0 actually blows stuff up

extremely cursed when your static firmware binary has a got in it

Show thread

actually @sys64738 pls help
whymst the fuck does a static firmware binary with a custom linker script end up with .got

Show thread

@haskal @sys64738 so it's reloctable? in case your embedded thingie comes with aslr? i guess? lol

@haskal @sys64738 no idea then

if even a single file is compiled differently, the whole thing gets one

@luna @haskal @sys64738 Someone should implement W^X and ASLR on an 8-bit machine just for a joke... 4-bit of randomness, happy bruceforcing!

@haskal It's more cursed Historically. On a VAX running 4.3BSD, address 0 always stores the number 0, no segfault, no bus error. A bad program may intentionally rely on this "feature" - who needs to check for NULL pointers when you get a default value for free... 🙈

@grainloom @haskal Yes. Need to wait three more years for ANSI C, you can't even use "void *" at this point.

@niconiconi @haskal Why does int b = NULL; make &b == NULL? Surely it'd just make b = 0?

Sign in to participate in the conversation

cybrespace: the social hub of the information superhighway jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal support us on patreon or liberapay!