Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I was under the impression that you cannot (err, should not) upgrade Storable without upgrading Perl at the same time.. Is that not the case?..

Also, I am not sure if it is failing during a read or a write, but according to the stack trace I'd say probably more likely a write...

Here is the code for writing:
my @vals=(\@someArray,\%someHash); my $res=store(\@vals,"$path/$name");
Here is some code for reading:
my @someArray = (); my %someHash = (); my $res=retrieve("$path/$name"); if($res) { my ($tmp1, $tmp2) = @$res; if($tmp1) { @someArray = @$tmp1; } if($tmp2) { %someHash = %$tmp2; } }
I started doing diff on storable.xs and am pretty sure that it must be failing inside magic_write, somewhere around this line:
WRITE(header, length);
Interestingly this was changed in 2.07 to:
WRITE( (unsigned char*) header, length);
The WRITE #define has been unchanged, even up to version 2.13:
#define WRITE(x,y) \ STMT_START { \ if (!cxt->fio) \ MBUF_WRITE(x,y); \ else if (PerlIO_write(cxt->fio, x, y) != y) \ return -1; \ } STMT_END
I'm not a C programmer so I'm not sure what relevance any of this has, could this be the source of the problem?... I can't find in the ChangeLog why that particular change was made and don't really know what it does...

Any ideas?...

In reply to Re^2: Storable core dumping... by devnul
in thread Storable core dumping... by devnul

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2022-05-23 15:44 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.