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 report #1893
Comments
From lr@hpllr1.hpl.hp.comCreated by lr@hpl.hp.comWhen a scalar that has a numerical value is assigned a constructed e:\> perl -e "my $x = 10; $x = '2' . $x; print $x + 0" Any simple calculation that produces a wrong value quietly is Perl Info
|
From @simoncozens
Okay, this sucks.
Here's what's happening: When Perl does a concatentation or substr, Inline Patch--- ../sv.c Mon Mar 13 19:18:29 2000
+++ ./sv.c Wed Apr 26 14:51:48 2000
@@ -3451,6 +3451,7 @@
if (!bigstr)
Perl_croak(aTHX_ "Can't modify non-existent substring");
SvPV_force(bigstr, curlen);
+ SvIOK_off(bigstr);
if (offset + len > curlen) {
SvGROW(bigstr, offset+len+1);
Zero(SvPVX(bigstr)+curlen, offset+len-curlen, char);
It's certainly a core problem though... Simon The information transmitted is intended only for the person or entity to |
From @simoncozensI stumbled: Inline Patch--- ../sv.c Mon Mar 13 19:18:29 2000
+++ ./sv.c Wed Apr 26 14:51:48 2000
@@ -3451,6 +3451,7 @@
if (!bigstr)
Perl_croak(aTHX_ "Can't modify non-existent substring");
SvPV_force(bigstr, curlen);
+ SvIOK_off(bigstr);
if (offset + len > curlen) {
SvGROW(bigstr, offset+len+1);
Zero(SvPVX(bigstr)+curlen, offset+len-curlen, char);
Simon The information transmitted is intended only for the person or entity to |
From [Unknown Contact. See original ticket]Larry Rosler <lr@hpllr1.hpl.hp.com> wrote
The real reason no nuclear reactors have exploded is that this bug doesn't So it's a good thing Simon has provided a patch. Mike Guy |
From [Unknown Contact. See original ticket]M.J.T. Guy (lists.p5p):
It doesn't happen in globals either; only lexicals. |
From [Unknown Contact. See original ticket]On Wed, Apr 26, 2000 at 03:42:20PM +0000, simon@brecon.co.uk wrote:
Gosh, does that mean that perl scripts written for nuclear reactors |
From @iabynfixed in 5.6.1 |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#3161 (status was 'resolved')
Searchable as RT3161$
The text was updated successfully, but these errors were encountered: