Re: [fpc-pascal] Re: Stack checking in dynamic libraries

2009-11-09 Thread Joost van der Sluis
On Sun, 2009-11-08 at 19:54 +0100, Jonas Maebe wrote: > cobines wrote on Sun, 08 Nov 2009: > > > I have to conclude that the values in rtl/inc/systemh.inc: StackTop, > > StackBottom, StackLength are not behaving as thread-specific variables > > in the library, even though they are declared using T

Re: [fpc-pascal] Re: Stack checking in dynamic libraries

2009-11-08 Thread cobines
2009/11/8 Jonas Maebe : > Your problem is that every FPC-compiled library contains its own copy of the > RTL. I hadn't thought of that... It all makes sense now of course. Thanks. -- cobines ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

Re: [fpc-pascal] Re: Stack checking in dynamic libraries

2009-11-08 Thread Jonas Maebe
cobines wrote on Sun, 08 Nov 2009: I have to conclude that the values in rtl/inc/systemh.inc: StackTop, StackBottom, StackLength are not behaving as thread-specific variables in the library, even though they are declared using ThreadVar. Your problem is that every FPC-compiled library contains

[fpc-pascal] Re: Stack checking in dynamic libraries

2009-11-08 Thread cobines
A followup from the previous mail. I have expanded the program to query pthreads library directly for thread's stack info. Here are the results (the lines containing "Pthr" string have values reported by the pthreads library): MainThreadId : 3076675264 < main thread, main program > CurrentThr