Comment # 8
on bug 11122
from Guy Harris
(In reply to Ralf G. R. Bergs from comment #7)
> (In reply to Guy Harris from comment #5)
>
> > Exception Type: EXC_BAD_ACCESS (SIGSEGV)
> > Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
> >
> > which means "null pointer dereference"
>
> Please note the address is 0x0000000000000008 (eight) -- so NOT a null
> pointer deref?
>
> Sorry if this is B/S, I haven't programmed in C since 20 years... :-)
struct foo {
char *p;
char *q;
};
...
struct foo *r = NULL;
...
if (r->q == NULL)
printf("It's null\n");
is dereferencing a null pointer, but, on an LP64 or LLP64 platform with the
page at address 0 mapped out (and with a null pointer having all its bits
clear, which isn't a requirement of C or C++), it will crash trying to fetch a
pointer at an address of 0x0000000000000008.
You are receiving this mail because:
- You are watching all bug changes.