VOGONS


First post, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

got an error in dosbox built from svn this morning;

I'm in gdb and I've narrowed it down a bit.

Program received signal SIGSEGV, Segmentation fault.
0x000000000043abb5 in PAGING_LinkPage (lin_page=4096, phys_page=4096) at paging.cpp:703
703 if (handler->flags & PFLAG_READABLE) paging.tlb.read[lin_page]=handler->GetHostReadPt(phys_page)-lin_base;

handler is null. looking at MEM_GetPageHandler which is were handler comes from, it shows that memory.lfb.mmiohandler is null, which is what it is returning.

looking a bit deeper;

(gdb) p handler
$1 = (PageHandler *) 0x0
(gdb) p memory.lfb.mmiohandler
$2 = (PageHandler *) 0x0
(gdb) p memory.lfb
$3 = {start_page = 0, end_page = 0, pages = 0, handler = 0x0, mmiohandler = 0x0}
(gdb) p memory
$4 = {pages = 4096, phandlers = 0x3934b20, mhandles = 0x393cb30, links = {used = 0, pages = {0 <repeats 20480 times>}}, lfb = {start_page = 0, end_page = 0,
pages = 0, handler = 0x0, mmiohandler = 0x0}, a20 = {enabled = true, controlport = 0 '\000'}}

I see a lot of values are null.

this is being caused by a dos extender app in dos. (dos32 by adam seychell). Just trying to figure out where to go from here.

might not be any use but here is the backtrace;

(gdb) bt
#0 0x000000000043abb5 in PAGING_LinkPage (lin_page=4096, phys_page=4096) at paging.cpp:703
#1 0x000000000043cd4a in InitPageHandler::InitPage (this=0x2dfa2d0 <init_page_handler>, lin_addr=16777216, writing=false) at paging.cpp:418
#2 0x000000000043bafd in InitPageHandler::readb (this=0x2dfa2d0 <init_page_handler>, addr=16777216) at paging.cpp:251
#3 0x000000000056025f in mem_readb_inline (address=16777216) at ../../include/paging.h:266
#4 mem_readb (address=16777216) at memory.cpp:490
#5 0x000000000044615b in CPU_Core_Normal_Run () at ./core_normal/prefix_none.h:459
#6 0x0000000000409571 in Normal_Loop () at dosbox.cpp:136
#7 0x0000000000409a0f in DOSBOX_RunMachine () at dosbox.cpp:260
#8 0x0000000000412149 in CALLBACK_RunRealInt (intnum=33 '!') at callback.cpp:105
#9 0x000000000072c9a2 in DOS_Shell::Execute (this=0x38aa2a0, name=0x7fffffffaa70 "sickview", args=0x7fffffffbca8 "") at shell_misc.cpp:543
#10 0x00000000007214a8 in DOS_Shell::DoCommand (this=0x38aa2a0, line=0x7fffffffbca8 "") at shell_cmds.cpp:157
#11 0x000000000071d6d0 in DOS_Shell::ParseLine (this=0x38aa2a0, line=0x7fffffffbca0 "sickview") at shell.cpp:250
#12 0x000000000071de65 in DOS_Shell::Run (this=0x38aa2a0) at shell.cpp:330
#13 0x000000000071efdc in SHELL_Init () at shell.cpp:725
#14 0x0000000000715c57 in Config::StartUp (this=0x7fffffffd188) at setup.cpp:888
#15 0x00000000005bf423 in main (argc=1, argv=0x7fffffffd328) at sdlmain.cpp:2095

The #4 line is I assume, because I have dosbox set to 16mb ram. I suspect its reading the top page in memory or trying to read beyond it or something to detect ram by walking it (the dos32 extender is walking it I suspect)...

any pointers on where I should go debugging from here...

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 1 of 1, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

whats interesting is, if I set ramsize to 32... it works (throws some cpu errors below), but setting it to 64 also segfaults...

Illegal read from 2000000, CS:IP        8:    1840
Illegal read from 2000000, CS:IP 8: 184c
Illegal write to 2000000, CS:IP 8: 1852
Illegal read from 2000000, CS:IP 8: 1856
Illegal read from 2000000, CS:IP 8: 1840
Illegal read from 2000000, CS:IP 8: 184c
....
repeated many more times

despite above errors, the program works. strange.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--