[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Mintlib based Software running under plain TOS




Hello,

the only real problems that I had until now was Getcookie() & getcwd() - they are both not compatible with TOS systems. Now NetSurf runs with TOS 2.06. But I still have problems with TOS 4.0 (Falcon TOS).

To be honest - I don't really like this bug hunting for an OS that I didn't intended to cover ;) I didn't completely finished my investigation, but maybe report my vague findings help a bit...

The Problem is: during an rts instruction I get an Bus-Error. Here is a bit of the code:

LINK.W A6, #-$0038
.... many instructions here ....
JSR _foobar
LEA.L $0030(A7), A7
CLR.B D0
UNLNK A6
RTS   <- BUS ERROR happens here.


One thing I find interesting and suspicious, is the value of A6: $01000 - I believe this is the largest value that an short variable can take. I'm posting this because maybe someone hears some (alarm) bell ringing when he sees $01000 within A6 :) Maybe it can explain a bit more what happened? Can somebody explain what a6 is used for with GCC? Is it something like the frame pointer? Because the RTS instruction fails, I was first thinking of a stack overwrite ( and an altered return address is likely to happen then), on the other hand I believe that the value within A6 is very suspicious, maybe it gives an hint... ? How high are the chances that a value of $01000 within a6 "has nothing to do with the problem"?

This one is bad to debug, because you have to restart your system after the bug is triggered (further attempts to start the executable result in early bail out with bizarre return values...) and calculating the virtual memory address where to set the breakpoint before the error happens is, well, boring ;)

Could it be that there is some difference on falcon / TOS 4 system within memory allocation? Because the error happens in an function which makes heavy use of Samba's talloc system...

Greet & thanks for reading.

m