in reply to Re: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
in thread Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

I've applied your binary patch and resurrected the original storable file so I know my privacy string edits (all the 'xxx..' and '000..' didn't have any affect on the resulting edited storable that I posted.

I've pulled Storable 1.0.13 off of backpan and am currently preparing a to apply your "Bugger" patch. Thank you very much for you indepth analysis and I'll be sure to follow up if I can record a dump of the data structure that caused it in the first place. (that is if I can reproduce the corrupt storable with multiple attempts with Storable 1.0.13 and 2.13)

I'll follow up on this thread when/if I can determine the actual cause. :P

Thanks again!

-biz-

  • Comment on Re^2: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

Replies are listed 'Best First'.
Re^3:Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
by tachyon (Chancellor) on Oct 27, 2004 at 22:58 UTC

    The interesting thing is that with the edits the restored data structure store/retrieves just fine! Forgot to mention that. There must be an extra byte or two in the original that is triggering the behaviour but where....and what.....

    Without a test case data structure it is like looking for a very small haystack in an enormous pile of needles! Did I mention I did not like the author's macro mania much yet ;-) As soon as you have a test case (and the croak will get you one provided you test and save it) it should be relatively easy to track down the issue(s)

    Storable is a module I use all the time, as do many others. We can all do without it randomly crashing. Good luck.

    cheers

    tachyon

Re^3: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
by tachyon (Chancellor) on Oct 27, 2004 at 23:18 UTC

    It was very thoughtful of you to edit the data. ++ for that. I presume you worked your way through it with a hex editor as I don't see how you could have done it with a regex. If you did manage to do it with REs please explain ;-)

      I edited the storable with... vim!!!! :P I actually did a range search and replace with vim and it worked like a charm. When looking at the file within vim, you can see hints of the data structure (scalars, arrays, and hashes). Along with running 'strings' against it, I was able to see what might be sensitive data and my intent was to censor it while keeping a storable that would reproduce the error.

      The lesson I learned was that I needed to keep the string length the exact same as the orginal file (which now makes perfect sense knowing that there are read length markers before each string).

      Before a Storable was a kind of mystical thing that just worked, and its really strange (for me anyway) to now be able to "see" and somewhat understand the file in a hex editor.

      I also applied your "patch" with vim as well, I removed the 7 characters you suggested and found another 0x05 entry in the file and yanked an pasted it in place. Then I ran my test case code and the damn thing thawed :) (I've did attempt to use an hex editor on my power book with little success because I've never really used one before). Anyway, vim++ :P

      -biz-

        You can use bvi which is binary vi if you want to make life easier!

        cheers

        tachyon