Skip to content
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

Commit eb06eac93f0 is asking for trouble. #10643

Closed
p5pRT opened this issue Sep 19, 2010 · 4 comments
Closed

Commit eb06eac93f0 is asking for trouble. #10643

p5pRT opened this issue Sep 19, 2010 · 4 comments
Labels

Comments

@p5pRT
Copy link

p5pRT commented Sep 19, 2010

Migrated from rt.perl.org#77932 (status was 'resolved')

Searchable as RT77932$

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2010

From @cpansprout

It does not actually introduce a bug, as far as I can tell, but it has the potential to make future refactorings cause SEGVs, as it uses PL_op without checking it first.

The attached patch rectifies this.

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2010

From @cpansprout

From​: Father Chrysostomos <sprout@​cpan.org>

Don’t use PL_op without checking it first.

Inline Patch
--- blead-45549-warn3/doio.c.orig	2010-08-08 18:25:47.000000000 -0700
+++ blead-45549-warn3/doio.c	2010-09-16 08:33:07.000000000 -0700
@@ -1241,7 +1241,9 @@ Perl_do_print(pTHX_ register SV *sv, Per
 	    else {
 		assert((char *)result == tmps);
 		Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8),
-				 "Wide character in %s", OP_DESC(PL_op));
+				 "Wide character in %s",
+				   PL_op ? OP_DESC(PL_op) : "print"
+				);
 	    }
 	}
 	/* To detect whether the process is about to overstep its

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 2010

@rgs - Status changed from 'new' to 'resolved'

@p5pRT p5pRT closed this as completed Sep 20, 2010
@p5pRT
Copy link
Author

p5pRT commented Sep 20, 2010

From @rgarcia

On 19 September 2010 21​:22, Father Chrysostomos
<perlbug-followup@​perl.org> wrote​:

It does not actually introduce a bug, as far as I can tell, but it has the potential to make future refactorings cause SEGVs, as it uses PL_op without checking it first.

The attached patch rectifies this.

From​: Father Chrysostomos <sprout@​cpan.org>

Don’t use PL_op without checking it first.

--- blead-45549-warn3/doio.c.orig       2010-08-08 18​:25​:47.000000000 -0700

Thanks, applied to bleadperl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant