[Lazarus] RE : App Seg Faults when -gh is unchecked

Ludo Brands ludo.brands at free.fr
Sun Sep 4 08:05:54 CEST 2011


 

-----Message d'origine-----
De : John Repucci [mailto:john.repucci at gmail.com] 
Envoyé : dimanche 4 septembre 2011 03:47
À : lazarus at lists.lazarus.freepascal.org
Objet : [Lazarus] App Seg Faults when -gh is unchecked


I've had this happen to me twice now.

I'm developing the app in the Lazarus IDE and all is well.  Then I uncheck
the -gh option ("Use Heaptrc Unit"), run my program and I get a Segmentation
Fault before any of the program shows up.  This happens both within the IDE
(via F9) and when I run the program outside of the IDE.

When I remove heaptrc from my uses clause AND uncheck -gh, all is well.

Thoughts?  Is this a bug which I should report?

 

If understand you correctly, the app crashes when heaptrc is in the uses
clause and -gh unchecked. Where do you use heaptrc ? The heaptrc unit, as
all memory managers, should be the first unit in the lpr. The -gh compiler
options is doing exactly that. Manually inserting heaptrc is discouraged.
 
The stack trace indicates that a memory block is reallocated that was
allocated before heaptrc was loaded and heaptrc doesn't find the crc for
that block.
 
Ludo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110904/d967bb51/attachment-0003.html>


More information about the Lazarus mailing list