Exception in fpc_popaddrstack()
Original Reporter info from Mantis: Raid
-
Reporter name: Dennis Fehr
Original Reporter info from Mantis: Raid
- Reporter name: Dennis Fehr
Description:
I am currently experiencing bug #24589 (closed) in an Apache Module (Shared Library) I'm writing. It seems randomly it crashes with fpc_popaddrstack .. It actually took me quite some time find out it's not actually my code.. When I do what it suggests in http://wiki.freepascal.org/Multithreaded_Application_Tutorial :
-------------------------------
type
tc = class(tthread)
procedure execute;override;
end;
procedure tc.execute;
begin
end;
{ main program }
begin
{ initialise threading system }
with tc.create(false) do
begin
waitfor;
free;
end;
{ ... your code follows }
end.
-------------------
(Basically Create/Free a Thread) will allow the CriticalSections to work.
Steps to reproduce:
[External Library (aka ExtLib) ]
- SomeFunc (that will be called from a thread)
- Use some Crit-Sections
[Program]
- Randomly Create Threads and call ExtLib.SomeFunc.
Additional information:
The Heap will also crash too on a sysgetmem, unless you call do a Temp-Thread Create..
Mantis conversion info:
- Mantis ID: 25742
- Build: 26818
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 27346 (#7ee72ef5)
- Target version: 3.0.0