Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::serialization trouble
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2010-07-16 05:35:47


Hi!

I boiled it down to a problem with static constant initializations which are
outside of boost::serialization. So sorry for the spam and blaming it.

If I link the attached code from hdf5_types.cpp to a hello world program, it
will crash due to some initialization trouble I don't get at the moment. It
works on Linux...

Sebastian

On Thu, Jul 15, 2010 at 7:52 PM, Robert Ramey <ramey_at_[hidden]> wrote:

> Sebastian Weber wrote:
> > Hi!
> >
> > I am experiencing quite odd errors with the serialization library: My
> > program compiles fine, but crashes when static constants are
> > declared, i.e. before the program even starts with main(). The
> > debugger tells me that some singleton declared in the seralization
> > library conflicts:
> >
> > Program received signal EXC_BAD_ACCESS, Could not access memory.
> > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> > 0x0000000100003aaf in H5::DataType::DataType () at singleton.hpp:149
> > 149 BOOST_DLLEXPORT T & singleton<T>::instance =
> > singleton<T>::get_instance();
> >
> > Any suggestions would be great here.
>
> How about including the smallest example you can make which demostrates the
> problem?
>
>
> >What makes it even harder to
> > understand is the fact that the exact same code runs perferctly on a
> > Linux machine, whereas the crash is on MacOS 10.6. My setup here is a
> > boost 1.43.0 compiled with gcc 4.5 from pacports (or apples gcc 4.2,
> > no difference).
> >
> > It seems that the singleton does things which are not allowed on a
> > 10.6 MacOS machine...
> >
> > Many thanks for help,
>
> You're welcome.
>
> Robert Ramey
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>






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