
On Wed, Jun 11, 2008 at 8:59 PM, Lothar Werzinger
Hi Ion,
find a simplified test case attached that reproduces my findings. Hopefully this will allow you to find the problem wether it is in my code or the library.
Your test also raises the same error in Windows, and that's because you don't call the constructors of the hooks. Hooks have a constructor that put the hook in a safe state (so that it can be checked before inserting it). More on this on the documentation: http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/safe_hook.html Surely, memory will be initialized to zero when creating the file and zero is the safe state for raw pointers. On the other hand, offset pointers have a different default state (null is represented by offset == 1). Anyway, I can't guarantee that the test will work with those changes (I have no time to test this on a 64 bit machine and you are constructing objects directly in a mapped file calculating sizes with magic numbers that might change in another platform/compiler/OS). Try to construct all objects (placement new or similar) before inserting them in the container and see if the error disappears. Regards, Ion