I could reproduce the problem on Fedora 18 x86_64. The error shows up in revision 23457, the only file changed in this revision is compiler/arm/aoptcpu.pas.

Checkin comment for file was:

Revision *23457* <http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=23457> - (view <http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/arm/aoptcpu.pas?revision=23457&view=markup>) (annotate <http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/arm/aoptcpu.pas?annotate=23457>) - [select for diffs] <http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/arm/aoptcpu.pas?r1=23457&view=log>
Modified /Sun Jan 20 14:57:43 2013 UTC/ (4 days, 6 hours ago) by /florian/
File length: 108993 byte(s)
Diff to previous 23456 <http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/arm/aoptcpu.pas?r1=23456&r2=23457>

* improve ShiftShiftShift2ShiftShift to look further ahead
* check register usage so the destination register can be differen


On a mac the problem does not exist, there i can build latest revision in svn without problems after applying Jeppe's patch for the IT problem (Thank you for that one, Jeppe!!)

So, Koenraad, perhaps you can do a svn update -r 23456 (or 23455) and retry the build, then you should hopefully have a very recent version of arm-embedded compiler+rtl.

The compiler segfaults when trying to compile rtl:

make -C embedded all
make[3]: Entering directory `/home/ring/devel/fpc/rtl/embedded'
/usr/bin/mkdir -p /home/ring/devel/fpc/rtl/units/arm-embedded
/home/ring/devel/fpc/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/home/ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -Us -Sg system.pp
make[3]: *** [system.ppu] Segmentation fault (core dumped)
make[3]: Leaving directory `/home/ring/devel/fpc/rtl/embedded'


Michael


Am 24.01.13 12:32, schrieb Jeppe Græsdal Johansen:
Den 24-01-2013 12:16, Koenraad Lelong skrev:
On 24-01-13 11:24, Jeppe Græsdal Johansen wrote:
Looks like a memory corruption problem. I just tried to compile trunk
with 2.6.0 as a starting compiler on win32 and had no problems(apart
from the broken RTL).

What starting compiler and what os/cpu are you on?


Hi,

What do you mean with memory corruption ? Is the memory of my PC broken, or is the compiler messing with the memory and then corrupts it ? As far as I see it's not possible to compile the RTL. That's my problem. The crosscompiler seems OK, when I run "ppcrossarm -i" I see the output I expect. I'm trying to be as clear as possible, but sometimes I presume too much and the reader does not understand what I want to say :-( What I was trying to do is pinpointing where it goes wrong. So I manualy tried running the last line before the compilation (how to do that : see the wiki) stopped with the segmentation fault. And I did this with gdb to get a backtrace. That's what I sent to the list.

You say you can't compile the RTL, what error do you get ?

I'm compiling this with FPC 2.6.0, on Opensuse 12.1 64 bit.

Anyway, thanks for your reply.

Regards,

Koenraad Lelong.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
What I mean is that I think the crash you experience means there's a bug in the compiler because your backtrace showed it crashed inside the heap manager. A typical sign after someone is using deallocated memory, or having buffer overflows.

I have fixed the issue with the RTL and submitted a patch: http://bugs.freepascal.org/view.php?id=23738
It was the same you wrote about some time ago.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to