New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug in Math::BigInt with undef #13283
Comments
From hb-perlbug@bsws.deCreated by hb-perlbug@bsws.deThis is a bug report for perl from hb-perlbug@bsws.de, ----------------------------------------------------------------- # Don't do anything with undefs. unless (defined($a[$i])) { callers, i. e. badd(), don't deal with any component being undef. sub badd # set up parameters return $x if $x->modify('badd'); in my case $y ends up being undef, objectify doesn't do anything to it, crude (and almost certainly not correct) fix: Inline Patch--- BigInt.pm.orig Tue Sep 17 10:37:09 2013
+++ BigInt.pm Tue Sep 17 10:32:12 2013
@@ -2670,11 +2670,12 @@ sub objectify {
next;
}
- # Don't do anything with undefs.
-
- unless (defined($a[$i])) {
- next;
- }
+# # Don't do anything with undefs.
+#
+# unless (defined($a[$i])) {
+# next;
+# }
+ $a[$i] //= 0;
# Perl scalars are fed to the appropriate constructor.
Perl Info
|
From @cpansproutOn Tue Sep 17 07:23:11 2013, hb-perlbug@bsws.de wrote:
That appears to be by design. I suspect your code is buggy in giving it Could you try to reduce your big webapp to something smaller that can -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From hb@bsws.de* Father Chrysostomos via RT <perlbug-followup@perl.org> [2013-09-17 17:38]:
no, it is not, your statement last not least contradicts perlop: "undef" is always treated as numeric, and in particular is and this has worked for ages, up until the upgrade to OpenBSD 5.4 and the bug was introduced in the trigger is sth like my %foo; that code is under "use warnings;" and doesn't trigger any, fwiw.
I tried, of course, but haven't been able to, i must miss some bit -- |
From zefram@fysh.orgMath-BigInt is maintained primarily as a CPAN distribution, so this -zefram |
@iabyn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#119863 (status was 'rejected')
Searchable as RT119863$
The text was updated successfully, but these errors were encountered: