I've built Apache 2.2.8 and APR with VS 2005 SP1.  I have written a module that does some heavy work in a separate thread spawned in the single child process (winnt_mpm).  I find that I get an access violation during one part of the code (from 3rd party lib) where memory usage increases and many messages are being written to stderr, and thus the error.log.

The odd thing is that I wrote a quick app that spawns this thread and does the same work, and I do not have the problem.  The memory usage goes up, the work finishes, and memory is released.  It works fine.  When running in the context of Apache, it generates a 0xC0000005 access violation.

Any thoughts on this would be helpful.  Thanks.