[Lazarus] RE : RE : RE:FPC_REQUIRES_PROPER_ALIGNMENTdefinedonSolariscausescrash in lazarus
Ludo Brands
ludo.brands at free.fr
Wed Jul 6 13:00:53 CEST 2011
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x40c50070 (LWP 2095)]
> 0x005b0e8c in TREGEXPR__REGNEXT (P=0x4c697f22 <Address
> 0x4c697f22 out of
> bounds>, this=0x41916ba0)
> at synregexpr.pas:2785
> 2785 offset := PRENextOff (p + REOpSz)^; //###0.933 inlined NEXT
> (gdb) bt
> #0 0x005b0e8c in TREGEXPR__REGNEXT (P=0x4c697f22 <Address 0x4c697f22
> out of bounds>, this=0x41916ba0)
> at synregexpr.pas:2785
Mark,
Attached is a patch to components/synedit/synregexpr.pas that fixes
alignment issues. I've tested the code against a test unit (attached) that
is a mix of fpc/packages/regexpr/examples/testreg1.pp and
Demos/SelfTest/TestRegExpr.drp (from the official TRegExpr package). The
result is the same for aligned and non-aligned platforms (error
120,121,122,123,124 and 703). This tests only that my changes have not
introduced a new bug, but, since I'm testing on Solaris x86, I can't be sure
that all data is aligned properly. It's possible I've missed something. I've
tried to set the AC cpu flag to force alignment checking but that generates
alignment errors in libc :(
Could you please test this on one of your sparc/arm systems?
Thanks, Ludo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testregexpr.lpr
Type: application/octet-stream
Size: 23035 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110706/629777fa/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: align_synregexpr.diff
Type: application/octet-stream
Size: 9657 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110706/629777fa/attachment-0007.obj>
More information about the Lazarus
mailing list