Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2007-03-22 16:55:59


Bugs item #1686329, was opened at 2007-03-22 13:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1686329&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: serialization
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Robert Ramey (ramey)
Summary: Usage of uninitialized data member

Initial Comment:
In the attached test case, data member basic_iarchive_impl::moveable_objects_recent is used before being initialized.

More specifically, the first call to basic_iarchive_impl::reset_object_address occurs before the first assignment of basic_iarchive_impl::moveable_objects_recent takes place (in basic_iarchive_impl::load_object).

The usage of uninitialized data can be detected using a memory checker such as valgrind, or a debugging environment which sets uninitialized memory to distinctive values, such as Visual C++.

I found this problem in 1.33.1 but I had a look at the 1.34 code in cvs and it does not appear to be fixed.

In a tentative fix I initialized moveable_objects_recent in the basic_iarchive_impl constructor (to zero). This seems to work but I am not sure it is the right solution.

This problem still occurs if the extra "i++" in basic_iarchive_impl::reset_object_address present in 1.33.1 is taken out.

This bug seems to be triggered by serializing a map whose values contain vectors.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1686329&group_id=7586

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk