Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-03

FPC compiled program stops with SIGILL on newer hardware (Pentium M 800 MHz)

13 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dirk Verwiebe

Hello,
my program, written ca 5 years ago which worked all the time on several hardware plattforms(486,AMD 64 ,Celeron 433)
crashs with a SIGILL error on my new Pentium M Board. The program was compiled with debug information and so i can see it stops if it in function getcpuinfo and cpu_init
in the cpu unit from Thomas Schatzl.
But when i write a small test program which uses the same functions of the unit,too it works without problems.
How can i found out where the problems comes from and how can i solve it ? Thanks in advance.

regards

Dirk

Dirk Verwiebe
to Dirk Verwiebe

The program works under dos with go32v2.
The compiler is FPC 1.06.

Show quoted text 23 lines
Hello, my program, written ca 5 years ago which worked all the time on several hardware plattforms(486,AMD 64 ,Celeron 433) crashs with a SIGILL error on my new Pentium M Board. The program was compiled with debug information and so i can see it stops if it in function getcpuinfo and cpu_init in the cpu unit from Thomas Schatzl. But when i write a small test program which uses the same functions of the unit,too it works without problems. How can i found out where the problems comes from and how can i solve it ? Thanks in advance. regards Dirk _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Daniël Mantione
to Dirk Verwiebe: my program, written ca 5 years ago which worked all the time on several hardware…

Op Fri, 9 Mar 2007, schreef Dirk Verwiebe:

Show quoted text 11 lines
Hello, my program, written ca 5 years ago which worked all the time on several hardware plattforms(486,AMD 64 ,Celeron 433) crashs with a SIGILL error on my new Pentium M Board. The program was compiled with debug information and so i can see it stops if it in function getcpuinfo and cpu_init in the cpu unit from Thomas Schatzl. But when i write a small test program which uses the same functions of the unit,too it works without problems. How can i found out where the problems comes from and how can i solve it ? Thanks in advance.

It sounds like some kind of cpu instruction is no longer supported on the Pentium M. You need to find out what instruction it is. Execute it in gdb and check on which instruction it stops.

Daniël

Dirk Verwiebe
to Daniël Mantione

Thank you very much for your quick reply.
Maybe you are right,but i have forgotten to write my program works without the cpu unit, and the cpu unit works without my program. It is a curios situation.

regards

Dirk

Show quoted text 27 lines
Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: > Hello, > my program, written ca 5 years ago which worked all the time on several > hardware plattforms(486,AMD 64 ,Celeron 433) > crashs with a SIGILL error on my new Pentium M Board. > The program was compiled with debug information and so i can see it > stops if it in function getcpuinfo and cpu_init > in the cpu unit from Thomas Schatzl. > But when i write a small test program which uses the same functions of > the unit,too it works without problems. > How can i found out where the problems comes from and how can i solve it ? > Thanks in advance. It sounds like some kind of cpu instruction is no longer supported on the Pentium M. You need to find out what instruction it is. Execute it in gdb and check on which instruction it stops. Daniël ------------------------------------------------------------------------ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Florian Klaempfl
to Dirk Verwiebe
Thank you very much for your quick reply. Maybe you are right,but i have forgotten to write my program works without the cpu unit, and the cpu unit works without my program. It is a curios situation.

Do you "mess" with exception/signal/interrupt handling? The cpu unit has to test SSE support of the OS by executing an sse instruction, if the OS doesn't support SSE one gets indeed a SIG_ILL but it should be catched by the cpu unit.

Show quoted text 36 lines
regards Dirk Daniël Mantione schrieb: > Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: > >> Hello, >> my program, written ca 5 years ago which worked all the time on several >> hardware plattforms(486,AMD 64 ,Celeron 433) >> crashs with a SIGILL error on my new Pentium M Board. >> The program was compiled with debug information and so i can see it >> stops if it in function getcpuinfo and cpu_init >> in the cpu unit from Thomas Schatzl. >> But when i write a small test program which uses the same functions of >> the unit,too it works without problems. >> How can i found out where the problems comes from and how can i solve it ? >> Thanks in advance. > It sounds like some kind of cpu instruction is no longer supported on the > Pentium M. You need to find out what instruction it is. Execute it in gdb > and check on which instruction it stops. > > Daniël > > > ------------------------------------------------------------------------ > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Dirk Verwiebe
to Florian Klaempfl

Hello Florian,

exception handling was the problem.I have removed the dpmiexcp unit and now it works again.
Thank you very much !!!!

regards

Dirk

Show quoted text 50 lines
Dirk Verwiebe schrieb: > Thank you very much for your quick reply. > Maybe you are right,but i have forgotten to write my program works > without the cpu unit, and the cpu unit works without my program. > It is a curios situation. Do you "mess" with exception/signal/interrupt handling? The cpu unit has to test SSE support of the OS by executing an sse instruction, if the OS doesn't support SSE one gets indeed a SIG_ILL but it should be catched by the cpu unit. > regards > > Dirk > > > Daniël Mantione schrieb: >> Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: >> >>> Hello, >>> my program, written ca 5 years ago which worked all the time on several >>> hardware plattforms(486,AMD 64 ,Celeron 433) >>> crashs with a SIGILL error on my new Pentium M Board. >>> The program was compiled with debug information and so i can see it >>> stops if it in function getcpuinfo and cpu_init >>> in the cpu unit from Thomas Schatzl. >>> But when i write a small test program which uses the same functions of >>> the unit,too it works without problems. >>> How can i found out where the problems comes from and how can i solve it ? >>> Thanks in advance. >> It sounds like some kind of cpu instruction is no longer supported on the >> Pentium M. You need to find out what instruction it is. Execute it in gdb >> and check on which instruction it stops. >> >> Daniël >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Florian Klaempfl
to Dirk Verwiebe
Hello Florian, exception handling was the problem.I have removed the dpmiexcp unit and now it works again.

Well, this is only a workaround. In 6762 I tried to fix dpmiexcp, can you test if this works for you?

Show quoted text 59 lines
Thank you very much !!!! regards Dirk Florian Klaempfl schrieb: > Dirk Verwiebe schrieb: >> Thank you very much for your quick reply. >> Maybe you are right,but i have forgotten to write my program works >> without the cpu unit, and the cpu unit works without my program. >> It is a curios situation. > Do you "mess" with exception/signal/interrupt handling? The cpu unit has > to test SSE support of the OS by executing an sse instruction, if the OS > doesn't support SSE one gets indeed a SIG_ILL but it should be catched > by the cpu unit. > >> regards >> >> Dirk >> >> >> Daniël Mantione schrieb: >>> Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: >>> >>>> Hello, >>>> my program, written ca 5 years ago which worked all the time on several >>>> hardware plattforms(486,AMD 64 ,Celeron 433) >>>> crashs with a SIGILL error on my new Pentium M Board. >>>> The program was compiled with debug information and so i can see it >>>> stops if it in function getcpuinfo and cpu_init >>>> in the cpu unit from Thomas Schatzl. >>>> But when i write a small test program which uses the same functions of >>>> the unit,too it works without problems. >>>> How can i found out where the problems comes from and how can i solve it ? >>>> Thanks in advance. >>> It sounds like some kind of cpu instruction is no longer supported on the >>> Pentium M. You need to find out what instruction it is. Execute it in gdb >>> and check on which instruction it stops. >>> >>> Daniël >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Dirk Verwiebe
to Florian Klaempfl

I would test it but where i can find the fix ?

regards

Dirk

Show quoted text 72 lines
Dirk Verwiebe schrieb: > Hello Florian, > > exception handling was the problem.I have removed the dpmiexcp unit and > now it works again. Well, this is only a workaround. In 6762 I tried to fix dpmiexcp, can you test if this works for you? > Thank you very much !!!! > > regards > > Dirk > > Florian Klaempfl schrieb: >> Dirk Verwiebe schrieb: >>> Thank you very much for your quick reply. >>> Maybe you are right,but i have forgotten to write my program works >>> without the cpu unit, and the cpu unit works without my program. >>> It is a curios situation. >> Do you "mess" with exception/signal/interrupt handling? The cpu unit has >> to test SSE support of the OS by executing an sse instruction, if the OS >> doesn't support SSE one gets indeed a SIG_ILL but it should be catched >> by the cpu unit. >> >>> regards >>> >>> Dirk >>> >>> >>> Daniël Mantione schrieb: >>>> Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: >>>> >>>>> Hello, >>>>> my program, written ca 5 years ago which worked all the time on several >>>>> hardware plattforms(486,AMD 64 ,Celeron 433) >>>>> crashs with a SIGILL error on my new Pentium M Board. >>>>> The program was compiled with debug information and so i can see it >>>>> stops if it in function getcpuinfo and cpu_init >>>>> in the cpu unit from Thomas Schatzl. >>>>> But when i write a small test program which uses the same functions of >>>>> the unit,too it works without problems. >>>>> How can i found out where the problems comes from and how can i solve it ? >>>>> Thanks in advance. >>>> It sounds like some kind of cpu instruction is no longer supported on the >>>> Pentium M. You need to find out what instruction it is. Execute it in gdb >>>> and check on which instruction it stops. >>>> >>>> Daniël >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> fpc-pascal maillist - >>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Daniël Mantione
to Dirk Verwiebe

Op Sat, 10 Mar 2007, schreef Dirk Verwiebe:

I would test it but where i can find the fix ?

The easiest way is to download a snapshot. For instructions see the website. Snapshots are built each night using the latest code, so are a very easy way to get the latest code.

Alternatively, you might want to check out the source from svn and compile yourself. Instructions are again on the website.

Daniël

Dirk Verwiebe
to Daniël Mantione

Ok. Thanks a lot.

Dirk

Show quoted text 20 lines
Op Sat, 10 Mar 2007, schreef Dirk Verwiebe: > I would test it but where i can find the fix ? The easiest way is to download a snapshot. For instructions see the website. Snapshots are built each night using the latest code, so are a very easy way to get the latest code. Alternatively, you might want to check out the source from svn and compile yourself. Instructions are again on the website. Daniël ------------------------------------------------------------------------ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Dirk Verwiebe
to Florian Klaempfl: Well, this is only a workaround. In 6762 I tried to fix dpmiexcp, can you test if this…

I have tried a small test program with cpu unit and it works neither with dpmiexcp nor without dpmiexcp.
I get with dpmiexcp and snapshot 2.05 (10.3.2007) following error:

SIGSEGV
FPC General Protection Fault

2.05 without dpmiexcp

An unhandled exception occured at
EAccessViolation : Access Violation

List of adresses.....
...

It works with fpc 1.06(26.04.2002) and without dpmiexcp.

It crashs with dpmiexcp. Error:SIGILL

I can´t test the new compiler version for my "real program" because it doesn´t compile my sources with graphix unit.

regards

Dirk

Show quoted text 72 lines
Dirk Verwiebe schrieb: > Hello Florian, > > exception handling was the problem.I have removed the dpmiexcp unit and > now it works again. Well, this is only a workaround. In 6762 I tried to fix dpmiexcp, can you test if this works for you? > Thank you very much !!!! > > regards > > Dirk > > Florian Klaempfl schrieb: >> Dirk Verwiebe schrieb: >>> Thank you very much for your quick reply. >>> Maybe you are right,but i have forgotten to write my program works >>> without the cpu unit, and the cpu unit works without my program. >>> It is a curios situation. >> Do you "mess" with exception/signal/interrupt handling? The cpu unit has >> to test SSE support of the OS by executing an sse instruction, if the OS >> doesn't support SSE one gets indeed a SIG_ILL but it should be catched >> by the cpu unit. >> >>> regards >>> >>> Dirk >>> >>> >>> Daniël Mantione schrieb: >>>> Op Fri, 9 Mar 2007, schreef Dirk Verwiebe: >>>> >>>>> Hello, >>>>> my program, written ca 5 years ago which worked all the time on several >>>>> hardware plattforms(486,AMD 64 ,Celeron 433) >>>>> crashs with a SIGILL error on my new Pentium M Board. >>>>> The program was compiled with debug information and so i can see it >>>>> stops if it in function getcpuinfo and cpu_init >>>>> in the cpu unit from Thomas Schatzl. >>>>> But when i write a small test program which uses the same functions of >>>>> the unit,too it works without problems. >>>>> How can i found out where the problems comes from and how can i solve it ? >>>>> Thanks in advance. >>>> It sounds like some kind of cpu instruction is no longer supported on the >>>> Pentium M. You need to find out what instruction it is. Execute it in gdb >>>> and check on which instruction it stops. >>>> >>>> Daniël >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> fpc-pascal maillist - >>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Tomas Hajny
to Daniël Mantione: Op Sat, 10 Mar 2007, schreef Dirk Verwiebe: The easiest way is to download a snapshot.…
Daniël Mantione wrote 10 lines
Op Sat, 10 Mar 2007, schreef Dirk Verwiebe: > I would test it but where i can find the fix ? The easiest way is to download a snapshot. For instructions see the website. Snapshots are built each night using the latest code, so are a very easy way to get the latest code. Alternatively, you might want to check out the source from svn and compile yourself. Instructions are again on the website.

Snapshots for GO32v2 are currently broken
(broken Makefile dependencies - I'll try to fix
that), so no snapshot has been generated
successfully since Florian's change of unit
dpmiexcp. The modified version of dpmiexcp.pp can
be found in trunk in our SVN repository - if you
can't use SVN for some reason, you can download
the full source pack from our FTP (just making
rtl should be enough for this test), or download
only the modified dpmiexcp.pp file via
http://www.freepascal.org/cgi-bin/viewcvs.cgi/
(or just fetch
http://svn.freepascal.org/svn/fpc/trunk/rtl/go32v2 /dpmiexcp.pp directly).

Tomas

Dirk Verwiebe
to Dirk Verwiebe: I have tried a small test program with cpu unit and it works neither with dpmiexcp nor…

I made an other test with the dpmiexcp unit, downloaded from:

http://www.freepascal.org/cgi-bin/viewcvs.cgi/

and it still it doesn´t work.

The unit can be compiled with fpc 1.06 but couldn´t be linked:

ERROR while linking.

FPC 2.02 can compile and link the unit but it crashed again as described below:

It seems FPC 2.02 doesn´t like the cpu unit.
If neccassary i could post the source of the test program.

regards
Dirk

Show quoted text 30 lines
I have tried a small test program with cpu unit and it works neither with dpmiexcp nor without dpmiexcp. I get with dpmiexcp and snapshot 2.05 (10.3.2007) following error: SIGSEGV FPC General Protection Fault 2.05 without dpmiexcp An unhandled exception occured at EAccessViolation : Access Violation List of adresses..... ... It works with fpc 1.06(26.04.2002) and without dpmiexcp. It crashs with dpmiexcp. Error:SIGILL I can´t test the new compiler version for my "real program" because it doesn´t compile my sources with graphix unit. regards Dirk