Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-10 Thread Jeppe Johansen
Den 10-01-2011 16:10, Jonas Maebe skrev: On 10 Jan 2011, at 06:54, Jeppe Johansen wrote: Doesn't the problem lie in that TFPGObjectList uses @ on the incoming parameters? function TFPGObjectList.Add(const Item: T): Integer; begin Result := inherited Add(@Item); end; Unless there's some mag

Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-10 Thread Jonas Maebe
On 10 Jan 2011, at 06:54, Jeppe Johansen wrote: Doesn't the problem lie in that TFPGObjectList uses @ on the incoming parameters? function TFPGObjectList.Add(const Item: T): Integer; begin Result := inherited Add(@Item); end; Unless there's some magic going on, won't it then point to the

Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-10 Thread michael . vancanneyt
On Mon, 10 Jan 2011, Jeppe Johansen wrote: Den 10-01-2011 02:36, leledumbo skrev: Compile the attached project (really difficult to trim it down) using two different options. First, using -glh, then using -g. The first one raises nothing (program runs fine), while the second raises segmentati

Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-09 Thread Jeppe Johansen
Den 10-01-2011 02:36, leledumbo skrev: Compile the attached project (really difficult to trim it down) using two different options. First, using -glh, then using -g. The first one raises nothing (program runs fine), while the second raises segmentation fault. When debugged deeper using gdb, the s

[fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-09 Thread leledumbo
Compile the attached project (really difficult to trim it down) using two different options. First, using -glh, then using -g. The first one raises nothing (program runs fine), while the second raises segmentation fault. When debugged deeper using gdb, the second gives this backtrace: Program rec