[fpc-devel] FPC 2.4.0rc1 and bug #15206

Sergey Bochkanov shadeofgray at yandex.ru
Tue Dec 8 13:58:51 CET 2009


Hello,


> You may want to compile the compiler with debug info: download the
> sources, go into the fpc directory and type
>    make OPT="-O- -gl" all

Results so far - crash when testing mlpe.pas unit:

> An unhandled exception occurred at $00000000004C903B :
> EAccessViolation : Access violation
>   $00000000004C903B line 958 of rgobj.pas
>   $0000000000589161 line 146 of x86/rgx86.pas
>   $00000000004CB877 line 1957 of rgobj.pas
>   $00000000004CB3C4 line 1787 of rgobj.pas
>   $00000000004C8233 line 563 of rgobj.pas
>   $00000000004BA251 line 798 of cgobj.pas
>   $0000000000527E20 line 1037 of psub.pas
>   $0000000000529191 line 1432 of psub.pas
>   $00000000005290A4 line 1508 of psub.pas
>   $0000000000529580 line 1632 of psub.pas
>   $000000000052993A line 1721 of psub.pas
>   $00000000005256C1 line 172 of psub.pas
>   $00000000005289B5 line 1318 of psub.pas
>   $0000000000577DEE line 1109 of pmodules.pas
>   $000000000055C913 line 394 of parser.pas
>   $000000000056CB5B line 1531 of fppumlpe.pas(726,5) Note: Local
> variable "HSize" is assigned but never used
> testmlpeunit.pas(69,5) Note: Local variable "AllSame" not used
> Fatal: Compilation aborted
> .pas
>   $0000000000576A6E line 695 of pmodules.pas

Last  line  seems  to  be  corrupted (compiler warning mixed with line
numbers), its correct form should be:

>   $000000000056CB5B line 1531 of fppu.pas

FPC   2.4.0rc1  was  used  (built  from  source  with  options  you've
specified).  Random  nature of this bug is confirmed - it appears with
probability 20-40%.

Steps to reproduce it:
1. download http://www.alglib.net/share/fpc-crash.zip
2. unpack somewhere (looks like that place does not matters)
3. cd into the "fpc-O-" directory
4.  edit  "check"  script.  It assumes that FPC compiler is located in
/ALGLIB/fpc_src/fpc-2.4.0rc1/compiler/ppcx64,   point   it   to   your
installation.
5. Set +x permissions for "check" and "cyc" scripts
6.  execute "cyc" script. This script will try to call "check fpc mlpe
-O-"  several  times  until  crash occurs. After 1-2 passes it occurs,
script terminates. You can find compiler log in log.txt

If  you  find  it  difficult to reproduce on your system, I may try to
find another example (it is only one unit, but there are several units
which sometimes crash when compiling)


> Our tests are very simple:
> a) their file names have to start with "t" and the extension has to be
> ".pp"

I  think  that  I'll  write  small  script  which renames ALGLIB units
according  to  your  conventions.  They  have  very  regular structure
(because  they  are  automatically generated) so simple regexp will do
the work.

One   more  question - ALGLIB takes about 3-6 minutes to make one pass
through full set of tests.  Is it fast enough for your framework?

Sergey Bochkanov.




More information about the fpc-devel mailing list