Discussion:
Odd crash in bochs
(too old to reply)
Joe Barrett
2005-02-23 01:17:41 UTC
Permalink
When I run null.exe, I enter the Null syscall handler and exit it
properly, then wait in the infinite loop it calls.

When I run shell.exe, I pretty much instantly crash:
========================================================================
Bochs is exiting with the following message:
[CPU ] allow_io(): TR:io_base <= 103
========================================================================

Looking through bochs.out, I see the following:
00009513968i[CPU ] | EIP=00001004 (00001002)
00009513968i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00009513968i[CPU ] | CR3=0x00000000 CR4=0x00000000
00009513968i[ ] restoring default signal behavior
00009513968i[CTRL ] quit_sim called with exit code 1

Looking up the eip value produces a very confusing "not found", and
objdump confirms that such an address doesn't exist in shell.exe

Has anyone else run into this issue or know what may help solve it?
I've got print statements in all of my syscall handlers and none of them
are ever called, and I went ahead and put print statements in
Spawn_Init_Process: it returns from the Spawn( [shell] ) command and
dies sometime while waiting on the shell to quit.

Thanks,
Joe
Joe Barrett
2005-02-23 21:38:32 UTC
Permalink
I've gotten my program so that b.exe, c.exe, and null.exe all work, but both
shell.exe and long.exe produce the same crash:

========================================================================
Bochs is exiting with the following message:
[CPU ] allow_io(): TR:io_base <= 103
========================================================================

What's puzzling is that long.exe doesn't work, as it doesn't have any
complicated system calls or anything like that - just a few thousand calls to
get the PID.

Has anyone else seen error messages like this before? If so, how did you get
rid of them? I've tried starting with a fresh source tree and writing my code
again, and I still got the error.

Thanks,
Joe
Joe Barrett
2005-02-24 18:49:36 UTC
Permalink
If anyone has crashes like what I had - or has other strange memory issues -
make sure to [when copying each segment to memory] ensure that you're copying
from the memory's offset in file, not the memory's start address.

Joe

Loading...