[Lazarus] RE : RE : RE :RE:FPC_REQUIRES_PROPER_ALIGNMENTdefinedonSolariscausescrashin lazarus

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sat Jul 9 15:00:21 CEST 2011


Ludo Brands wrote:
>> 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? 
>>
> 
> I've tested the patch on a "qemulated" sparc debian and it works fine with
> the test unit. QEMU sparc does generate SIGBUS for unaligned data (contrary
> to QEMU ARM). A small testprogram (unaligned integer) confirmed that.

Looking good. Very well done, sir :-)

Applied (with a very minor manual intervention) to 0.9.30 with 2.4.2 on 
an UltraSPARC running Debian "Lenny". Result successfully compiled etc. 
a non-trivial program (couple of background threads, quite a lot of 
database activity).

Will apply to ARM later and build on Qemu, then test the binary on an 
NSLU2 "Slug" which is known to be sensitive to alignment issues. I'll 
probably not have result until tomorrow, but suggest that the patch as 
it stands is worth adding to the bug report to get it into the record.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list