Code: Select all
#define NULL ((void *)0) // Standard C NULL definition
...
typedef struct
{
unsigned int something;
} xyz_t;
xyz_t *x = NULL;
unsigned int y = x->something;
Candamir
Code: Select all
#define NULL ((void *)0) // Standard C NULL definition
...
typedef struct
{
unsigned int something;
} xyz_t;
xyz_t *x = NULL;
unsigned int y = x->something;
Well, yes, homebrew systems are typically having their own behaviour here ... I was more speaking of what you could encounter when dev'ing under e.g. MS-DOS (0000:0000 being a very valid read address and a very naughty place to write), embedded systems, handheld, game consoles and the like.Candy wrote: In my OS, last boot loader, you could read the IVT and the boot parameter struct that was passed along. If you did that after splitting off your own process space, or in fact any address <0xC0000000, you'd get a GPF.