[Lazarus] RE : RE :FPC_REQUIRES_PROPER_ALIGNMENTdefinedonSolariscausescrash in lazarus

Ludo Brands ludo.brands at free.fr
Tue Jul 5 13:07:54 CEST 2011



> With those three patches applied basic operation appears OK, 
> but I might 
> now be seeing different behavior on the three systems I'm testing.
> 
> First, on ARM Linux (Debian "Squeeze") running in the context 
> of Qemu I 
> am able to build a non-trivial program (several units, background 
> thread, database access) which runs successfully. I've not yet tested 
> debugger access etc.
> 

Great. 

Before I forget, I have created a patch for clocale which has been committed
in svn 17919. Before the patch exceptions where created in functions like
DateToStr.

> Second, on SPARC Linux (Debian "Lenny") running on a Sun 
> Ultra-1 with a 
> minimal project (button on form -> close) I get this during 
> "Build All":
> 
> Compiling project1.lpr
> Compiling unit1.pas
> unit1.pas(16,25) Hint: Parameter "Sender" not used
> Assembling unit1
> Assembling project1
> Compiling resource /home/markMLl/lib/sparc-linux/project1.or
> 
> Program received signal SIGBUS, Bus error.

This probably indicates an alignment error.

> [Switching to Thread 0xf7fa5aa0 (LWP 3925)]
> 0x00686ee8 in TREGEXPR__EMITNODE (OP=6 #6, this=0xf6129660) at 
> synregexpr.pas:1507
> 1507         PRENextOff (regcode)^ := 0; // Next "pointer" := nil

regcode is a PCHAR, PRENextOff is ^PtrInt. So, yes, that is asking for
non-aligned access? There are several similar constructs in SynRegExpr. That
is going to be a non-trivial fix, I'm afraid. 

> gtk2callback.inc:2406 #16 0xf787cb40 in ?? () from 
> /usr/lib/libglib-2.0.so.0 #17 0xf787cb40 in ?? () from 
> /usr/lib/libglib-2.0.so.0 Backtrace stopped: previous frame 
> identical to this frame (corrupt stack?)
> 
> I don't know what to make of the "corrupt stack" messages 
> which resemble 
> something from an older version which had debugging record 
> errors. They 
> might be a red herring since lazbuild and generated code are 
> OK on this 
> system.

Perhaps stackframes removed. But there you are already in glib. The lazarus
routine is triggered by a timer and, if I understand this correctly, you are
in the routine that is scanning the messages window and puts icons in front
of the messages. Here it is looking for "Unit x not used in y" messages. You
can check "Hide Messages Icons" in Tools/IDE Options/Window to get around
this one, for the time being.

> 
> Third, on ARM Linux (Debian "Lenny") running natively on an 
> NSLU2 "Slug" 
> I appear to get a failure building a program. This is using Lazarus 
> built on the Qemu system (building natively takes an 
> unacceptable length 
> of time), I don't yet have a backtrace etc. on account of 
> slow operation 
> on this system (work continues).
> 

Tbc

Ludo





More information about the Lazarus mailing list