Pascal Viandier wrote:
I am sorry to be back on this subject after a so long time, but I just hit the problem with a real-life program. I applied the patch you suggested and ran the gpc test suite again. It gives worse results than previously with 97 unexpected failures.
If I run some programs under gdb I get Segmentation faults in various places in sets.pas. For example SetCopy (line 286) adam3g adam3h assumptions awindte2 awindtes dostest SetEqual (line 215) adam3k adam3l adam3m adam3n WordNumber (line 113) adam3q adam3r ancestor2 Test fail with no core dump az44 chief41 couper10 couper8 gpc gives: warning: `absolute' declaration increases required alignment and test fail chris4 chris5
Is there a patch to solve this problem? If you need more information, I will do my best to give it.
FYI: I did run the test suite on Solaris 2.6 with the sets patch applied and all set test run fine (there were two test failures concerning packed arrays). So the problem is triggered by same specific detail of your configuration (exact versions of software, configure options, shell, assembler and linker etc...).
ATM our Solaris is down so I can not test directly. To get more information one can type `info registers' and `dissasemble' at the point of crash.
It would help if you can narrow down the problem: does it occur also is all sets are variable or only if one of the arguments is constant. Also when comparing sets the compiler is doing exivalent of:
type Plong = ^MedCard; .... if SetEqual(Plong(@s1), Plong(@s2)) then...
It would be nice to have a testcase does not use the runtime, but just its own copy of SetEqual.