Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Guard against attempting to deserialize the wrong type
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-05-25 16:43:45


the xml_archive does detect these errors. For me that the only real use for xml_archives.

Robert Ramey
  "Dan Eaton" <daniel.eaton_at_[hidden]> wrote in message news:AD3E5D661CED404A842D89A45C87D5661654313E1E_at_axe-post.Acceleware.local...
  Hello,

  I'm just wondering if NVP/XML archives check the name during deserialization?

   

  I just had a problem whereby I tried deserializing an object to one type, but the archive actually contained a different (larger ) object type. The first serialized element of the object just so happened to be an unsigned int, and I was trying to deserialize an enum, so the output actually seemed sensible, and didn't cause any problems until I later deserialized the full object from the same archive, which caused a segmentation fault in the boost::serialize source (trying to get ETI from a null pointer).

   

  I was using a polymorphic text archive, and as I mentioned above, am wondering if I switched to an XML archive if this sort of user-error would be detected.

   

  Thanks,

         

        Dan Eaton
        Software Developer
        Acceleware Corp. (TSX-V:AXE) www.acceleware.com
        

        Phone: +1.403.249.9099 Ext.295
        Fax: +1.403.249.9881
        Email: daniel.eaton_at_[hidden]
       
         
        
       
        Get superpowered!
        Acceleware gets your products to market faster, better and stronger!
       
         
        
       
        This e-mail may contain information that is privileged and confidential and subject to legal restrictions and penalties regarding its unauthorized disclosure or use. You are prohibited from copying, distributing or otherwise using this information if you are not the intended recipient. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and its attachments from your system. Thank you.
        © 2008 Acceleware, Inc. All Rights Reserved
       
         
        
        
       
   

   

   

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

  _______________________________________________
  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