According to Maurice Lombardi:
- The test\extended\time.pas works OK with the bash shell, but is broken
with ordinary command.com DOS shell (or Win3.11 DOS box): [...]
I cannot reproduce this. :-(
- more important: when trying to compile the unit System.pas contained
in BPcompat 1.0 I get a SIGSEGV error, [...]
Frank has tracked down this error to the following: : : unit system; : interface : implementation : : var junk:integer; : : to begin do : for junk := 1 to 1 do; : : end. (Vielen Dank, Frank!)
... so I will be able to hunt it now. :-)
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
Peter Gerwinski wrote:
Frank has tracked down this error to the following: : : unit system; : interface : implementation : : var junk:integer; : : to begin do : for junk := 1 to 1 do; : : end.
There is another error in this initialization part (which presumably has nothing to do with the crash of the compiler). The variable ppJunk is New'ed, used to fill CmdLine, which is a pointer of pChar type, Then Dispose'd. So the memory to which CmdLine points is reputted into the heap, and can be overwrited by subsequent instructions in the main program. The following shot program displays the bug:
program Essai; {$x+} uses gpctypes, system;
var pBug:^String1024; begin writeln(cmdline); new(pBug); pBug^:='Non!!!'; writeln(cmdline); end.
when compiled and called with
essai Oui!!!
it OutPuts
Oui!!! Non!!!
Hope that it helps