Hi TK,

thanks for offering to help. I now pushed a GCC-portable version of
Tom's stack check to freecom's git:
https://github.com/FDOS/freecom

However if you try to compile it you'll see once you run it that it
says 0 stack left quite quickly. The reason is not the stack (there is
plenty) but the heap which grows towards the stack. The default heap
is very small though (6K), still it grows much further than OW's (with
OW the stack is below the heap though but I debugged it a few times).
You can easily make it bigger in build.sh, with 8K metados boots.

I tried to limit heap grow a bit using a patch to nanomalloc
https://gist.github.com/f45f2874b16afd8957d019db6182067e
which basically takes any free block at the end into account when it
needs to grow the heap via sbrk, so it does not leave a hole there.

Anyway, even with that and 8K, "tests oberon16" in metados still fails.
With OW command.com "tests oberon16" finishes (although it reports
"BEF - bad command or file name" in the beginning), but if I run it
twice the second one fails with invalid opcodes (ie. memory
corruption). I'll debug this some more to see if older freecoms had
this issue too.

Bart


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to