Boost Serlialization on XScale problem

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 --

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

Thanks for the try Robert, but that still gives the same problem...
I suspect that its a deep seated libc or compiler problem, but the
serialization libraries are the first thing to manifest this problem.
weird.
On Mon, Sep 29, 2008 at 12:52 AM, Robert Ramey
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi, I'm trying to build my application in release mode using VC8 and failing with a link error: LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_34_1.lib' I am including the non-debug version of the thread library and don't want the debug version in there (because that's going to cause other link errors) but have no idea how the debug version is being included in the link. Apologies if this is a little off topic but has anyone had this problem or got any suggestions? Thanks, Patrick ****************************************************************************** "This message and any attachments are solely for the intended recipient and may contain confidential and privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you." Interactive Transaction Solutions Ltd (2473364 England) Registered Office: Systems House, Station Approach Emsworth PO10 7PW ********************************************************************** Ce message �lectronique contient des informations confidentielles � l'usage unique des destinataires indiqu�s, personnes physiques ou morales. Si vous n'�tes pas le destinataire voulu, toute divulgation, copie, ou diffusion ou toute autre utilisation de ces informations, est interdite. Si vous avez re�u ce message �lectronique par erreur, nous vous remercions d'en avertir son exp�diteur imm�diatement par email et de d�truire ce message ainsi que les �l�ments attach�s. Interactive transaction Solutions SAS- France (RCS Pontoise : 489 397 877) Si�ge social : Parc Saint Christophe, 10, Avenue de l�Entreprise 95865 Cergy-Pontoise Cedex ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

Patrick Loney wrote:
I'm trying to build my application in release mode using VC8 and failing with a link error:
LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_34_1.lib'
I am including the non-debug version of the thread library and don't want the debug version in there (because that's going to cause other link errors) but have no idea how the debug version is being included in the link.
Apologies if this is a little off topic but has anyone had this problem or got any suggestions?
My guess is that _DEBUG is defined for some reason, but the library selection logic is in boost/config/auto_link.hpp, which code generation options are you using? HTH, John.

My guess is that _DEBUG is defined for some reason, but the library selection logic is in boost/config/auto_link.hpp, which code generation options are you using?
Thank you John, you've just saved my sanity, _DEBUG was defined in one of the sub projects. ****************************************************************************** "This message and any attachments are solely for the intended recipient and may contain confidential and privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you." Interactive Transaction Solutions Ltd (2473364 England) Registered Office: Systems House, Station Approach Emsworth PO10 7PW ********************************************************************** Ce message �lectronique contient des informations confidentielles � l'usage unique des destinataires indiqu�s, personnes physiques ou morales. Si vous n'�tes pas le destinataire voulu, toute divulgation, copie, ou diffusion ou toute autre utilisation de ces informations, est interdite. Si vous avez re�u ce message �lectronique par erreur, nous vous remercions d'en avertir son exp�diteur imm�diatement par email et de d�truire ce message ainsi que les �l�ments attach�s. Interactive transaction Solutions SAS- France (RCS Pontoise : 489 397 877) Si�ge social : Parc Saint Christophe, 10, Avenue de l�Entreprise 95865 Cergy-Pontoise Cedex ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
participants (4)
-
John Maddock
-
lee nookx
-
Patrick Loney
-
Robert Ramey