Skip Menu |

This queue is for tickets about the Sub-Name CPAN distribution.

Report information
The Basics
Id: 96893
Status: resolved
Priority: 0/
Queue: Sub-Name

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Sub::Name may not change its string argument buffer
The core testsuite comes up with a nice bug in Sub::Name in t/mro/next_edgecases.t See https://code.google.com/p/perl-compiler/issues/detail?id=345 Sub::Name::subname('Bar::bar', $m); where 0x00007ffff632ffc2 in XS_Sub__Name_subname (cv=0xab3358) at Name.xs:67 67 *end = 0; (gdb) p end $1 = 0x734884 <pv5+6> "bar" and pv5 is compiled to a static constant buffer. With perlcc -O3 and probably other embedders you should not change a constant buffer, you need to return a copy instead. The workaround is to create a dynamic variable instead: my $name = 'Bar::bar'; Sub::Name::subname($name, $m); I will come up with a simple XS patch. -- Reini Urban
On Wed Jul 02 13:27:13 2014, RURBAN wrote: Show quoted text
> The core testsuite comes up with a nice bug in Sub::Name in > t/mro/next_edgecases.t > See https://code.google.com/p/perl-compiler/issues/detail?id=345 > > Sub::Name::subname('Bar::bar', $m); > where > 0x00007ffff632ffc2 in XS_Sub__Name_subname (cv=0xab3358) at Name.xs:67 > 67 *end = 0; > (gdb) p end > $1 = 0x734884 <pv5+6> "bar" > and pv5 is compiled to a static constant buffer. > > With perlcc -O3 and probably other embedders you should not change a > constant buffer, you need to return a copy instead. The workaround is > to create a dynamic variable instead: > my $name = 'Bar::bar'; > Sub::Name::subname($name, $m); > > I will come up with a simple XS patch.
See https://github.com/rafl/sub-name/pull/1 -- Reini Urban
Hey rafl, if you give me comaint I'll shepherd this to the cpan :)
On Thu Jul 03 12:17:45 2014, ETHER wrote: Show quoted text
> Hey rafl, if you give me comaint I'll shepherd this to the cpan :)
I believe I'm more qualified to do so. -- Reini Urban
Fixed in the 0.06 release. thanks all!
From: paul [...] city-fan.org
With the included B::C in perl 5.8.8, I get this: $ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/RT42725_deparse....ok t/RT96893_perlcc....."my" variable $pv masks earlier declaration in same scope at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/B/C.pm line 660. Unknown option: O3 Unknown option: UCarp Unknown option: UConfig FAILED before any test output arrived t/smoke..............ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/RT96893_perlcc.t ?? ?? % ?? Failed 1/3 test scripts, 66.67% okay. 1/13 subtests failed, 92.31% okay. make: *** [test_dynamic] Error 255
Subject: Re: [rt.cpan.org #96893] Sub::Name may not change its string argument buffer
Date: Fri, 11 Jul 2014 07:17:32 -0700
To: "paul [...] city-fan.org via RT" <bug-Sub-Name [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
Reini tells me that a new release of B::C is coming soon. It would probably be sensible to bump the version of B::C looked for in that test, when that happens. In the meantime however, it should be safe to force installation if only that test is failing. On Fri, Jul 11, 2014 at 10:13:44AM -0400, paul@city-fan.org via RT wrote: Show quoted text
> Queue: Sub-Name > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=96893 > > > With the included B::C in perl 5.8.8, I get this: > > $ make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/RT42725_deparse....ok > t/RT96893_perlcc....."my" variable $pv masks earlier declaration in same scope at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/B/C.pm line 660. > Unknown option: O3 > Unknown option: UCarp > Unknown option: UConfig > FAILED before any test output arrived > t/smoke..............ok > Failed Test Stat Wstat Total Fail Failed List of Failed > ------------------------------------------------------------------------------- > t/RT96893_perlcc.t ?? ?? % ?? > Failed 1/3 test scripts, 66.67% okay. 1/13 subtests failed, 92.31% okay. > make: *** [test_dynamic] Error 255
-- "An excuse is the mark of a moral coward." - Joseph Cimino . . . . . Karen Etheridge, karen@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++
From: paul [...] city-fan.org
On Fri Jul 11 10:17:53 2014, ETHER wrote: Show quoted text
> > Reini tells me that a new release of B::C is coming soon. It would > probably be sensible to bump the version of B::C looked for in that > test, > when that happens.
Yes, I'm ignoring that test for now.
CC: Reini Urban <RURBAN [...] cpan.org>
Subject: Re: [rt.cpan.org #96893] Sub::Name may not change its string argument buffer
Date: Fri, 11 Jul 2014 10:32:11 -0500
To: bug-Sub-Name [...] rt.cpan.org
From: Reini Urban <rurban [...] x-ray.at>
I can explain it. The old core compiler from 5.8 is throwing this error. Unfortunately I haven't checked these cases. Beginning with 1.48 (released today), the new compiler will overwrite the old 5.6, 5.8 compiler from CORE. But I really should be checking the version numbers $] and $B::C::VERSION before running the perlcc test. On Fri, Jul 11, 2014 at 9:32 AM, paul@city-fan.org via RT <bug-Sub-Name@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=96893 > > > On Fri Jul 11 10:17:53 2014, ETHER wrote:
>> >> Reini tells me that a new release of B::C is coming soon. It would >> probably be sensible to bump the version of B::C looked for in that >> test, >> when that happens.
> > Yes, I'm ignoring that test for now.
-- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/
CC: Reini Urban <RURBAN [...] cpan.org>
Subject: Re: [rt.cpan.org #96893] Sub::Name may not change its string argument buffer
Date: Fri, 11 Jul 2014 10:52:32 -0500
To: bug-sub-name <bug-Sub-Name [...] rt.cpan.org>
From: Reini Urban <rurban [...] x-ray.at>
Karen: Can you pull from https://github.com/rurban/sub-name/commit/14ab89a70c59a069974afa09ccb08b181149b5e0 I couldn't persuade github to create a proper pull request from my fork to your fork. It only allows to upstream = rafl. On Fri, Jul 11, 2014 at 10:32 AM, Reini Urban via RT <bug-Sub-Name@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=96893 > > > I can explain it. > The old core compiler from 5.8 is throwing this error. Unfortunately I > haven't checked these cases. > > Beginning with 1.48 (released today), the new compiler will overwrite > the old 5.6, 5.8 compiler from CORE. > > But I really should be checking the version numbers $] and > $B::C::VERSION before running the perlcc test. > > > On Fri, Jul 11, 2014 at 9:32 AM, paul@city-fan.org via RT > <bug-Sub-Name@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=96893 > >> >> On Fri Jul 11 10:17:53 2014, ETHER wrote:
>>> >>> Reini tells me that a new release of B::C is coming soon. It would >>> probably be sensible to bump the version of B::C looked for in that >>> test, >>> when that happens.
>> >> Yes, I'm ignoring that test for now.
> > > > -- > Reini Urban > http://cpanel.net/ http://www.perl-compiler.org/ >
-- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/
Subject: Re: [rt.cpan.org #96893] Sub::Name may not change its string argument buffer
Date: Fri, 11 Jul 2014 09:46:39 -0700
To: Reini Urban via RT <bug-Sub-Name [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Fri, Jul 11, 2014 at 11:52:42AM -0400, Reini Urban via RT wrote: Show quoted text
> Queue: Sub-Name > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=96893 > > > Karen: > Can you pull from > https://github.com/rurban/sub-name/commit/14ab89a70c59a069974afa09ccb08b181149b5e0 > > I couldn't persuade github to create a proper pull request from my > fork to your fork. > It only allows to upstream = rafl.
Done, and released in 0.07. thanks!