diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-04 23:04:44 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-04 23:05:59 -0700 |
commit | 45029d2dbcc918ee10234beaf6a38744ad61567e (patch) | |
tree | da5557fd6d5b48c27ccf793368418a27265b782c /MANIFEST | |
parent | 733a5566738583595dfc3a5d95e1229a3bfda72f (diff) | |
download | perl-45029d2dbcc918ee10234beaf6a38744ad61567e.tar.gz |
[perl #73534] Bigrat segfaults on irrational numbers
aka [rt.cpan.org #55767] segfault on sqrt(2) with bigrat
The problem seems to be in &Math::BigInt::objectify. It doesn’t try to
convert the number object into the right class if $upgrade is defined.
The attached patch changes it to make sure it belongs to the calling
class or to the $upgrade class.
Here is a ‘one’-liner to trigger the same bug without bigrat:
perl -Ilib -MMath::BigInt=upgrade,Math::BigFloat \
-MMath::BigFloat=upgrade,Math::BigMouse -le \
'@Math::BigMouse::ISA = Math::BigFloat; print sqrt Math::BigInt->new(2)'
Diffstat (limited to 'MANIFEST')
-rw-r--r-- | MANIFEST | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2825,6 +2825,7 @@ dist/Math-BigInt/t/sub_mbf.t Empty subclass test of BigFloat dist/Math-BigInt/t/sub_mbi.t Empty subclass test of BigInt dist/Math-BigInt/t/sub_mif.t Test A & P with subclasses using mbimbf.inc dist/Math-BigInt/t/trap.t Test whether trap_nan and trap_inf work +dist/Math-BigInt/t/upgrade2.t Test that two upgrade levels work dist/Math-BigInt/t/upgradef.t Test if use Math::BigFloat(); under upgrade works dist/Math-BigInt/t/upgrade.inc Actual tests for upgrade.t dist/Math-BigInt/t/upgrade.t Test if use Math::BigInt(); under upgrade works |