Subject: | Cannot serialize Math::BigInt::GMP |
Date: | Thu, 29 Apr 2010 17:32:52 -0700 |
To: | bug-Math-BigInt-GMP [...] rt.cpan.org |
From: | tabris <tabris [...] tabris.net> |
When one uses 'Storable' on a Math::BigInt::GMP object, it serializes
the pointer, not the value. When you load it in, a segfault occurs.
Looks related to https://rt.cpan.org/Public/Bug/Display.html?id=49336
I ran into this issue while passing a Math::BigInt::GMP object through
Storable and then through a socket to a forked process.
Math::BigInt works with Storable, but not JSON (not that
Math::BigInt::GMP does either).
I think we need better serialize methods for both classes.
Basic info:
Debian Lenny.
perl 5.10.0
tabris@leif:~$ dpkg -l libmath*
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name
Version Description
+++-=======================================-=======================================-==============================================================================================
ii libmath-bigint-gmp-perl
1.24-1 GMP library for Math::BigInt
routines
un libmath-bigint-perl
<none> (no description available)
ii libmath-gmp-perl
2.04-2.1+b1 high speed arbitrary size
integer math for perl
tabris@leif:~$ dpkg -l perl
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name
Version Description
+++-=======================================-=======================================-==============================================================================================
ii perl
5.10.0-19lenny2 Larry Wall's Practical
Extraction and Report Language
tabris@leif:~$
Message body not shown because it is not plain text.