Boost logo

Boost Users :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-06-12 06:40:31


On Wed, Jun 11, 2008 at 8:59 PM, Lothar Werzinger <lothar_at_[hidden]> wrote:
> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net