Re: avoiding SIGSEGV



Frank Kotler wrote:
Herbert Kleebauer wrote:

Frank Kotler wrote:
In an xterm, the "non-robust" build segfaults as expected. With the

But which value has esi when it faults?

0804A000h, same as in a "regular" terminal.

For another data point, in an xterm, the non-robust version crashed with a sig 11 after printing these last lines:

08049FFD
08049FFE
08049FFF
0804A000
Segmentation fault (core dumped)

gdb says:

Program terminated with signal 11, Segmentation fault.
#0 0x0804808c in _start.top ()

objdump disassembly:

08048085 <_start.top>:
8048085: 89 f0 mov %esi,%eax
8048087: e8 28 00 00 00 call 80480b4 <showeaxh>
804808c: ac lods %ds:(%esi),%al
804808d: eb f6 jmp 8048085 <_start.top>


It's the behavior of the "-dROBUST" version that's puzzling! It *doesn't* fault, but exits cleanly, as expected, but later than expected...

The robust verion exited cleanly after printing:

08049FFD
08049FFE
08049FFF
0804A000


--
Thomas M. Sommers -- tms@xxxxxx -- AB2SB

.



Relevant Pages

  • Re: avoiding SIGSEGV
    ... T.M. Sommers wrote: ... a sig 11 after printing these last lines: ... Segmentation fault. ...
    (alt.lang.asm)
  • Re: XFree86 + Signal 11 = Bad Juju
    ... > I always thought a sig 11 was hardware caused: ... A signal 11 (segmentation fault) means that the program accessed memory ... outside its permitted range. ...
    (Debian-User)