Mail Archives: djgpp/1999/08/16/16:38:05
In article <7p8lmn$np3$1 AT planja DOT arnes DOT si> you wrote:
> int main()
> {
> int* i;
> i = (int*)0x0;
> *i = 1;
This *should* crash with a SIGSEGV because of a NULL pointer access.
> return(0);
> }
> What's wrong with this? Isn't the data to reset at number 0x0???
You don't even care to tell us what you observed, to make you think
there's something wrong with it. I don't understand what 'the data to
reset' is supposed to mean.
The above program will behave differently, depending on which DPMI
host you run it under:
1) In the DOS box of Win9x: program will probabably run silently, and
without signalling any error. That's because silly Win9x doesn't care
to catch NULL pointer derereferences.
2) Run in raw DOS, with CWSDPMI as the DPMI provider, you'll get a
crash and register dump, as it should be.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -