[M3devel] pickle bug..solved?.. not supposed to work?

Tony Hosking hosking at cs.purdue.edu
Sun Dec 13 19:11:44 CET 2009


Yes, v1 is there in case anyone has v1 pickles they want to decode.

On 13 Dec 2009, at 00:50, Jay K wrote:

> I assume there is a need to keep the code around for compatibility?
> You know -- to read existing files?
> And to keep testing that?
>   And write them at least so the tests can read them back?
>  
>  
> But maybe we should take a read-only attitude?
>  
>  
> And switch the quake netobj=netobj1 to netobj=netobj2?
>  
>  
> It's tough..if you convert-upon-write, and people are
> running old programs, you'll break their files.
>  
>  
> It's also tough, you know, I think this stuff is too automatic.
> I'm pretty sure we should change the Text internal representation,
> but I'm also pretty sure the persistance (disk) representation
> is automatically derived from the transient (memory)
> representation and changing the second breaks the first.
>  
>  
> You know, I suspect it is like those systems
> that do:
>  
>  
> struct foo a;
> fwrite(&a, sizeof(a));
>  
>  
> but just with endian/wordsize conversions and
> hashes/typeid to do checks upon read, so it
> won't crash if you change things, but it also won't
> read back successfully.
>  
>  
> Maybe the v1 limitations are good as well, in that maybe
> it is faster, and sometimes the limitations don't matter???
>  
>  
>  - Jay
> 
>  
> Date: Sun, 13 Dec 2009 00:52:53 -0500
> From: rcoleburn at scires.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] pickle bug..solved?.. not supposed to work?
> 
> Jay:
>  
> I've done a lot with Pickles and with NetObj.
>  
> I switched to the v2 version a long time ago and never looked back.
>  
> IMO, we should switch over to v2 exclusively and consider v1 obsolete.  Perhaps some others should comment on this to see if they share my opinion.
>  
> Regards,
> Randy
> 
> >>> Jay K <jay.krell at cornell.edu> 12/13/2009 12:34 AM >>>
> 
> https://projects.elego.de/cm3/ticket/1068
> 
> 
> 
> 
> 
> I've only spent a few minutes here.
> 
> Trying to find the relative code and such.
> 
> 
> 
> 
> 
> The code is here:
> 
> 
> 
> 
> 
> C:\dev2\cm3.2\m3-comm\netobj\tests\perf\src
> 
> 
> 
> I found it by looking near the top of the stack in
> 
> the bug report -- NetObjTest.m3 -- and
> 
> then dir /s/b NetObjTest.m3.
> 
> 
> 
> or find . | grep NetObjTest.m3$ on Unix.
> 
> 
> 
> 
> 
> It appears that Pickle v1 and v2 are both
> 
> available in the same library.
> 
> There is INTERFACE Pickle and INTERFACE Pickle2.
> 
> 
> 
> 
> 
> It appears netobj can use either.
> 
> 
> 
> If you look at the stack in the bug, there is a lot of "v1" stuff.
> 
> 
> 
> 
> 
> We provide Quake functions:
> 
> 
> 
> readonly proc netobjv1(intf, type) is
> ...
> 
> end
> 
> 
> 
> readonly proc Netobjv1(intf, type) is
> ...
> 
> end
> 
> 
> 
> readonly proc netobjv2(intf, type) is
> ...
> 
> end
> 
> 
> 
> readonly proc netobj(intf, type) is
>   netobjv1(intf, type)
> end
> 
> 
> 
> 
> 
> 
> v1 pickles cannot cross endian/wordsize boundaries.
> 
> 
> 
> 
> 
> I think the bug is not so much in the pickle code, nor in the netobj code,
> 
> but in the test code, or the running of it.
> 
> 
> 
> Tests involving v1 won't work crossing endian/wordsize boundaries.
> 
> V1 tests probably should still run, and maybe detect the mismatch
> 
> and just claim success?
> 
> 
> 
> And then v2 should get better coverage?
> 
> 
> 
> 
> 
> Any more bugs then?
> 
> I was procrastinating on this because I've never done anything with pickles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091213/e52eed69/attachment-0002.html>


More information about the M3devel mailing list