[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] How program CWD can change during appl_init() call?
Hi,
I've been debugging for several days a problem where VBCC
built program fails rsrc_load() call to RSC file residing
in the same directory.
It happens only under MiNT 1.17.0 and related version
of XaAES and TosWin2 and Bash from Sparemint (when I run
them under Aranym v0.9.13).
It doesn't happen if I build the same program with GCC.
It doesn't happen if run the program from the desktop
instead of TosWin2/Bash.
It doesn't happen if I run the program under MiNT v1.16
under Hatari.
Finally I've tracked the problem to program's CWD changing
during appl_init() call.
The CWD change is visible from /kern/<pid>/cwd/.
If I stop the process before and after appl_init(), before
the call CWD points to right directory, after that, to
a wrong directory, one where TosWin2 resides.
Now, my question is, how it's possible for appl_init()
to change MiNT's view of current work directory for
the program?
Currently I'm suspecting this to be some kind of MiNT
memory corruption issue caused by XaAES, potentially
when it gets bad appl_init() values from VBCC built
GEMlib...
Any comments on how one can debug what happens inside
OS during OS call or what data could get overwritten
inside OS?
- Eero