Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Serlialization on XScale problem
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-09-28 19:52:04


I doubt its a problem with the library but try this:

{ std::ifstream ifs("filename");
    {
        boost::archive::text_iarchive ia(ifs); // <--- causes a segfault.
    }
}

platforms which don't destroy everything in the reverse sequence
of creation would have problems which would be addressed
by this change.

Robert Ramey

lee nookx wrote:
> Hi,
>
> I am having a strange problem with the Boost Serilalizartion library
> on an XScale platform. I am using v1.34.1 of the libraries and I'm
> seeing segfaults when creating an archive object, but only under some
> circumstances.
>
> The problem occurs in several different projects, but I've been able
> to reproduce it using the most simple case from the tutorial
> (http://www.boost.org/doc/libs/1_36_0/libs/serialization/doc/index.html).
> The problem that I see is that the code segfaults at these lines, and
> a core dump shows this error is occuring down on malloc_trim():
>
> std::ifstream ifs("filename");
> boost::archive::text_iarchive ia(ifs); // <--- causes a segfault.
>
>
> However, if I move the "std::ifstream ifs("filename");" further up the
> code (next to the initialisation of the ofs object, then the code
> works fine.
>
> Has anyone else seen any problems like this before?
>
> We have been using Boost::Thread, and Boost::Date-Time without any
> problems for a while, so I believe that this may just be a
> serialization library problem. I am also going to give v1.36.0 a try
> to see if it's something subtle that's been fixed already.
>
> (I have a core dump that I can make available if anyone needs it....)
>
>
>
> --lee


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