Closed p5pRT closed 9 years ago
AFL finds this:
% ./miniperl -e '"z" =~ /x|y{01,}/'
miniperl: regexec.c:6443: S_regmatch: Assertion `st->u.curly.min <= st->u.curly.max' failed.
Aborted (core dumped)
%
This is a symptom of a bigger problem: regpiece()
decides if the regexp fragment about to be parsed is a quantifier by calling regcurly()
, which returns TRUE if it matches /\{\d+,?\d*\}/
; if so, it then uses grok_atou
to parse the numbers out a) assuming it will always succeed, and b) ignoring any range issues.
In particular, that means if a number matches /^0\d/
it'll return MAX_UV
, which is cast to I32 for initial checks (which is how the above test got past the normal min < max
check), but then truncated to unsigned 16 bits (though REG_INFTY
assumes signed 16 bits):
% ./miniperl -Dr -e 'qr/x{01,}/' 2>&1 | grep CURLY
1: CURLY {65535,32767} (5)
%
.. and if a number is valid but out of range it'll be similarly truncated:
% ./miniperl -Dr -e 'qr/x{7777777777}/' 2>&1 | grep CURLY
1: CURLY {30833,30833} (5)
%
Fixing this is made harder by the fact that, although there were long-term plans to change it, we currently treat anything nearly but not quite a valid quantifier as literal instead - changing regcurly()
to return FALSE for these cases would mean we'd be silently changing the interpretation of existing regexps caught by this to something completely different.
Better would be to raise an error, or at least a warning; but then this becomes the one exception to the "treat as literal if not valid" approach, likely leading to more confusion. Also, regcurly()
is called from several places in toke.c and regcomp.c, so it may be tricky to get them to act consistently.
So I'm not sure what to do here.
Hugo
On 13 February 2015 at 19:43\, Hugo van der Sanden \perlbug\-followup@​perl\.org wrote:
# New Ticket Created by Hugo van der Sanden # Please include the string: [perl #123814] # in the subject line of all future correspondence about this issue. # \<URL: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123814 >
AFL (\<http://lcamtuf.coredump.cx/afl>) finds this:
% ./miniperl -e '"z" =~ /x|y{01\,}/' miniperl: regexec.c:6443: S_regmatch: Assertion `st->u.curly.min \<= st->u.curly.max' failed. Aborted (core dumped) %
This is a symptom of a bigger problem: regpiece() decides if the regexp fragment about to be parsed is a quantifier by calling regcurly()\, which returns TRUE if it matches /{\d+\,?\d*\/; if so\, it then uses grok_atou to parse the numbers out a) assuming it will always succeed\, and b) ignoring any range issues.
In particular\, that means if a number matches /^0\d/ it'll return MAX_UV\, which is cast to I32 for initial checks (which is how the above test got past the normal min \< max check)\, but then truncated to unsigned 16 bits (though REG_INFTY assumes signed 16 bits):
Am i understanding this to mean that grok_atou will turn any "number" starting with 0 that is not 0 itself into MAX_UV?
That sounds less than awesome. It also makes me wonder if people really are using this in the wild?
Why dont we just ignore the leading zeros?
Yves
The RT System itself - Status changed from 'new' to 'open'
On Sun Feb 15 21:37:46 2015\, demerphq wrote:
Am i understanding this to mean that grok_atou will turn any "number" starting with 0 that is not 0 itself into MAX_UV?
Yes\, that's what it is documented to do. But it's almost as if not everybody that uses it fully reads its documentation before using it.
That sounds less than awesome. It also makes me wonder if people really are using this in the wild?
Why dont we just ignore the leading zeros?
Presumably because that gives equally surprising results\, whether you end up treating 010 as 10 or 8.
There are inputs that it considers errors\, and it has a mechanism to report those errors; however a high proportion of callers are ignoring that.
I think the whole interface of it is encouraging bugs. I think we need something more like the grok_bslash_x style - to return a boolean success and use pointer arguments for the resulting values - since it becomes a bit more obvious if the caller isn't checking that the parse was successful\, particularly in combination with -Wunused-result.
I think we'd also benefit from specific functions (or macros) for each of the different integer types/sizes we might target\, so that the range checks happen in just one place and we reduce the problem of blind casting.
Ignoring XS/APItest and code duplicataion in ext/re\, I found some 29 callers; a quick glance at those suggest around 25 of them are dubious.
In the meantime\, we might want to consider the doc patch below.
Hugo
--- a/numeric.c +++ b/numeric.c @@ -1035\,7 +1035\,7 @@ Perl_grok_number_flags(pTHX_ const char *pv\, STRLEN len\, U /* =for apidoc grok_atou
-grok_atou is a safer replacement for atoi and strtol. +grok_atou is a replacement for atoi and strtol.
grok_atou parses a C-style zero-byte terminated string\, looking for a decimal unsigned integer. (END)
NOW would be the time to fix the API of grok_atou.
It was invented some time last summer by yours truly as a less insane replacement for atoi() (which has a bunch of its own problems\, and which the core was using left and right).
Why NOW? Because it has been only in 5.21.x\, *and* only used by the core. So before it escapes the lab\, please fix it as you see fit.
Off-hand\, maybe it should have a special-special case of /^0+/ becoming zero. Maybe. As Hugo pointed out\, the ugly octal case rears its 010 head. Or maybe make it return boolean - in which case it cannot be an atoi drop-in-replacement any more.
The design directive of grok_atou was "accept only strictly valid decimal positive integers\, reject anything else". "000000" fails that. But maybe the rejection should be signaled by the primary return type.
In which case it might as well be removed\, no need to tinker with its docs. More importantly\, no need to keep multiplying APIs. We have already enough of them.
But PLEASE\, fix it. Or kill it. (I would but I lack the tuits right now\, in the fast oncoming 5.22 track)
... it should be possible to try reverting the commit(s) where grok_atou was introduced\, and we would be back to using native atoi().
On Wed Feb 18 18:57:43 2015\, jhi wrote:
... it should be possible to try reverting the commit(s) where grok_atou was introduced\, and we would be back to using native atoi().
But atoi has more bugs. Why can't we just take this out of the public API? We can rename it to begin with an underscore and mark it as experimental\, removing the docs\, so that tghere is only discouragement for people using it\, and the docs say you do so at your own risk
-- Karl Williamson
On 19 February 2015 at 12:59\, Karl Williamson via RT \perlbug\-followup@​perl\.org wrote:
On Wed Feb 18 18:57:43 2015\, jhi wrote:
... it should be possible to try reverting the commit(s) where grok_atou was introduced\, and we would be back to using native atoi().
But atoi has more bugs. Why can't we just take this out of the public API? We can rename it to begin with an underscore and mark it as experimental\, removing the docs\, so that tghere is only discouragement for people using it\, and the docs say you do so at your own risk
Lets not *remove* the docs. Lets update them appropriately. :-)
Yves
-- perl -Mre=debug -e "/just|another|perl|hacker/"
On Wed Feb 18 18:45:47 2015\, jhi wrote:
NOW would be the time to fix the API of grok_atou. [...] Why NOW? Because it has been only in 5.21.x
Oh\, I hadn't noticed that it was so recent; in that case\, strongly agreed.
Off-hand\, maybe it should have a special-special case of /^0+/ becoming zero. Maybe. As Hugo pointed out\, the ugly octal case rears its 010 head. Or maybe make it return boolean - in which case it cannot be an atoi drop-in-replacement any more.
Given we've already killed atoi uses\, I don't think it's a big problem that it would no longer be a drop-in replacement.
I'll have a go at making a version that retains the strictness but returns boolean success\, with target-type-specific variants. In the meantime I've pushed the branch hv/grok with what I think is the appropriate short-term fix for the primary issue in this ticket - I'd also like comments on whether we're happy to add a new failure message to cover /x{00}/ and /x{999999999999999999999999}/.
Hugo
To the tune of "everybody should take out their own garbage"\, attached is a patch that would remove grok_atou()\, and leave the atoi() (and strtol\, etc.) in their naked glory. But this state of things does not pass e.g. the tests added in
[perl #123782] regcomp: check for overflow on /(?123)/
aka http://perl5.git.perl.org/perl.git/commit/b3725d49f914ef2bed63d7eb92a72ef6e886b489
But one can take a look at the patch to see where the atoi() spots are.
On 19 February 2015 at 22:33\, Jarkko Hietaniemi via RT \perlbug\-followup@​perl\.org wrote:
To the tune of "everybody should take out their own garbage"\, attached is a patch that would remove grok_atou()\, and leave the atoi() (and strtol\, etc.) in their naked glory. But this state of things does not pass e.g. the tests added in
\[perl \#123782\] regcomp​: check for overflow on /\(?123\)/
aka http://perl5.git.perl.org/perl.git/commit/b3725d49f914ef2bed63d7eb92a72ef6e886b489
But one can take a look at the patch to see where the atoi() spots are.
My inclination is to go with Hugo's option. I dont think reverting this stuff is ideal. But i think at this point it is up to Hugo.
cheers\, Yves
My inclination is to go with Hugo's option. I dont think reverting
I agree. The main point of my patch was to clearly show where and how grok_atou changed things\, since I saw to my horror that instead of being one or few clean commits\, it was quite a few more\, not cleanly separable.
this stuff is ideal. But i think at this point it is up to Hugo.
-- There is this special biologist word we use for 'stable'. It is 'dead'. -- Jack Cohen
I've repushed branch hv/grok with a second commit as a proof of concept. There's a few loose ends\, but should be enough to see how much you like or hate it - passes a basic test run except for XS-APItest\, for which I'll need to acquire some XS fu.
Hugo
On 02/19/2015 04:59 AM\, demerphq wrote:
On 19 February 2015 at 12:59\, Karl Williamson via RT \perlbug\-followup@​perl\.org wrote:
On Wed Feb 18 18:57:43 2015\, jhi wrote:
... it should be possible to try reverting the commit(s) where grok_atou was introduced\, and we would be back to using native atoi().
But atoi has more bugs. Why can't we just take this out of the public API? We can rename it to begin with an underscore and mark it as experimental\, removing the docs\, so that tghere is only discouragement for people using it\, and the docs say you do so at your own risk
Lets not *remove* the docs. Lets update them appropriately. :-)
Yves
We should strive for a really good API before releasing it to the public. At this late date\, it seems advisable to restrict the use of this one to the core given there are complaints about it.
On 20 February 2015 at 00:43\, Karl Williamson \public@​khwilliamson\.com wrote:
On 02/19/2015 04:59 AM\, demerphq wrote:
On 19 February 2015 at 12:59\, Karl Williamson via RT \perlbug\-followup@​perl\.org wrote:
On Wed Feb 18 18:57:43 2015\, jhi wrote:
... it should be possible to try reverting the commit(s) where grok_atou was introduced\, and we would be back to using native atoi().
But atoi has more bugs. Why can't we just take this out of the public API? We can rename it to begin with an underscore and mark it as experimental\, removing the docs\, so that tghere is only discouragement for people using it\, and the docs say you do so at your own risk
Lets not *remove* the docs. Lets update them appropriately. :-)
Yves
We should strive for a really good API before releasing it to the public. At this late date\, it seems advisable to restrict the use of this one to the core given there are complaints about it.
Ah I see\, you mean docs available from perldoc\, and I mean docs available from reading the comment above the function.
Yves
-- perl -Mre=debug -e "/just|another|perl|hacker/"
On Thursday-201502-19 11:30\, Hugo van der Sanden via RT wrote:
I've repushed branch hv/grok with a second commit as a proof of concept. There's a few loose ends\, but should be enough to see how much you like or hate it - passes a basic test run except for XS-APItest\, for which I'll need to acquire some XS fu.
Looks good\, thanks!
In the APItest.xs I am not certain what was the problem\, but I think you just need to rename the numeric.xs:grok_atou() as grok_atoUV()\, and change it to call grok_atoUV() properly?
There's also Devel::PPPort code which deals with grok_atou(). We don't need backward compat code for it since it has been in only 5.21.*
On Fri Feb 20 05:39:45 2015\, jhi wrote:
On Thursday-201502-19 11:30\, Hugo van der Sanden via RT wrote:
I've repushed branch hv/grok with a second commit as a proof of concept.
I should mention also that I'd planned to add type-specific variants for eg U32\, I32 etc afterwards\, but I'm less convinced now that they would add significant value. I'm hoping that if all the examples in core look like 'if (grok_atoUV(...) && uv \<= SOME_LIMIT)' people will copy and adapt that appropriately.
There's a few loose ends\, but should be enough to see how much you like or hate it - passes a basic test run except for XS- APItest\, for which I'll need to acquire some XS fu.
Looks good\, thanks!
In the APItest.xs I am not certain what was the problem\, but I think you just need to rename the numeric.xs:grok_atou() as grok_atoUV()\, and change it to call grok_atoUV() properly?
Merely lack of experience with XS; once I found an example elsewhere of returning a boolean it was straightforward.
There's also Devel::PPPort code which deals with grok_atou(). We don't need backward compat code for it since it has been in only 5.21.*
As far as I can see\, the only reference is the captured embed.fnc entry\, it's on the unsupported list; I assume after this lands\, the next update to PPPort will magically remove grok_atou and add grok_atoUV - Matthew\, is that correct?
There are also some references in perlclib.pod\, which will need some new text since we no longer have a drop-in substitute\, and the XXX comments for (at least) magic_set() and reg() need some thinking.
I think what's there now is worth some smoke-testing\, I've renamed the branch to smoke-me/hv-grok.
Hugo
On Friday-201502-20 10:52\, Hugo van der Sanden via RT wrote:
I think what's there now is worth some smoke-testing\, I've renamed the branch to smoke-me/hv-grok.
I'll grab a copy and smoke it too.
On Friday-201502-20 11:45\, Jarkko Hietaniemi wrote:
I'll grab a copy and smoke it too.
Good with Configure -des -Dusedevel in:
CentOS 6.6 x86_64 OS X 10.10.2 x86_64 FreeBSD 9.3-BETA2 amd64 IRIX64 irix 6.5 MIPS Solaris 5.10 sparc
The last two are 32-bit\, that might be of some proof value.
On Fri Feb 20 07:52:06 2015\, hv wrote:
I think what's there now is worth some smoke-testing\, I've renamed the branch to smoke-me/hv-grok.
Hmm\, I'm getting a consistent failure for +threads -debugging under win32 that I don't understand. The log for that config (at http://m-l.org/~perl/smoke/perl/win32/smoke-me/Hugo%20van%20der%20Sanden/log564cba32cbcca439aa4cff6c9da609586124b2f3.log.gz) starts like so:
Configuration: -Dusedevel -Duseithreads
make distclean ... Copy Policy.sh ... Configure ...[./Configure -Dusedevel -Duseithreads -DCCTYPE=MSVC]
make ...[nmake -f smoke.mk -nologo /D CCTYPE=MSVC80FREE MAKE="nmake -nologo /D" ] Could Not Find D:\smoke\perl\smoke-me\build\win32\config.h NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2' Stop.
The other configurations all look like:
Configuration: -Dusedevel -DDEBUGGING
make distclean ... Copy Policy.sh ... Configure ...[./Configure -Dusedevel -DDEBUGGING -DCCTYPE=MSVC]
make ...[nmake -f smoke.mk -nologo /D CCTYPE=MSVC80FREE MAKE="nmake -nologo /D" ] Could Not Find D:\smoke\perl\smoke-me\build\win32\config.h Running config_h.PL Writing config.h config.h has changed Options: (DEBUGGING HAS_TIMES HAVE_INTERP_INTERN [...]
Anyone have a clue for that?
Hugo
On Saturday-201502-21 6:14\, Hugo van der Sanden via RT wrote:
Configuration: -Dusedevel -Duseithreads ------------------------------------------------------------------------------ make distclean ... Copy Policy.sh ... Configure ...[./Configure -Dusedevel -Duseithreads -DCCTYPE=MSVC]
Sorry\, I have no idea for the failure as such.
Though the question is\, was this failure there before your patch?
On Sat Feb 21 04:28:52 2015\, jhi wrote:
Though the question is\, was this failure there before your patch?
Not that I can see - blead smokes are not showing a config fail\, though the waters are muddied by intermittent test fails.
Hugo
On Saturday-201502-21 7:35\, Hugo van der Sanden via RT wrote:
On Sat Feb 21 04:28:52 2015\, jhi wrote:
Though the question is\, was this failure there before your patch?
Not that I can see - blead smokes are not showing a config fail\, though the waters are muddied by intermittent test fails.
I will kick off a smoke on another branch\, to gain more data. Hoping I hit the same set of smoke boxes.
Hugo
On Sat\, Feb 21\, 2015 at 5:14 AM\, Hugo van der Sanden via RT \perlbug\-followup@​perl\.org wrote:
On Fri Feb 20 07:52:06 2015\, hv wrote:
I think what's there now is worth some smoke-testing\, I've renamed the branch to smoke-me/hv-grok.
Hmm\, I'm getting a consistent failure for +threads -debugging under win32 that I don't understand. The log for that config (at http://m-l.org/~perl/smoke/perl/win32/smoke-me/Hugo%20van%20der%20Sanden/log564cba32cbcca439aa4cff6c9da609586124b2f3.log.gz) starts like so:
Configuration: -Dusedevel -Duseithreads ------------------------------------------------------------------------------ make distclean ... Copy Policy.sh ... Configure ...[./Configure -Dusedevel -Duseithreads -DCCTYPE=MSVC]
make ...[nmake -f smoke.mk -nologo /D CCTYPE=MSVC80FREE MAKE="nmake -nologo /D" ] Could Not Find D:\smoke\perl\smoke-me\build\win32\config.h NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2' Stop.
I can't reproduce that just doing a straight build of the branch on Windows 7 with CCTYPE=MSVC110 so it must have something to do with what gets written to smoke.mk by Test::Smoke. I think normally config.h is just copied from a template to build miniperl and then another config.h is generated later to build perl\, but it looks like Test::Smoke generates config.h from the outset. Seeing the rules in smoke.mk for generating config.h might shed light on something.
On Sat Feb 21 08:31:49 2015\, craig.a.berry@gmail.com wrote:
I can't reproduce that just doing a straight build of the branch on Windows 7 with CCTYPE=MSVC110 so it must have something to do with what gets written to smoke.mk by Test::Smoke.
Thanks Craig\, I see also that Friday's rebase got a clean Win32 run\, which makes me feel a lot better.
Hugo
On Thu Feb 19 08:44:25 2015\, public@khwilliamson.com wrote:
We should strive for a really good API before releasing it to the public. At this late date\, it seems advisable to restrict the use of this one to the core given there are complaints about it.
I tried restricting the new function:
-Apdn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr +EXpdn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
.. but ext/Dynaloader complains it can't see it. Should I simply be adding a #define PERL_EXT to that module? I had assumed all the core extensions would get that automatically\, so I'm not sure what the ramifications are.
Hugo
On 02/27/2015 11:08 AM\, Hugo van der Sanden via RT wrote:
On Thu Feb 19 08:44:25 2015\, public@khwilliamson.com wrote:
We should strive for a really good API before releasing it to the public. At this late date\, it seems advisable to restrict the use of this one to the core given there are complaints about it.
I tried restricting the new function:
-Apdn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr +EXpdn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
.. but ext/Dynaloader complains it can't see it. Should I simply be adding a #define PERL_EXT to that module? I had assumed all the core extensions would get that automatically\, so I'm not sure what the ramifications are.
Hugo
--- via perlbug: queue: perl5 status: open https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123814
Someone else will have to tell us about the ramifications of adding PERL_EXT are.
But\, I think the embed.fnc entry should have an M flag\, and the =for apidoc line removed from the documentation for the function. That will mean that no documentation is generated\, and so someone would have to be looking through the code to even know that this function exists.
One option that wouldn't have further ramifications would be to add a line to dlutils.c #define PERL_IN_DLUTILS_C and then in embed.fnc\, surround its entry with
#if defined(PERL_CORE) || defined(PERL_EXT) || defined(PERL_IN_DLUTILS_C)
and an #endif.
That way the prototype for the function is available only to the specified areas and no others\, unless someone is really crazy and adds there own #defines to get around our restriction.
I've now merged this work:
35cd12d [perl #123814] stricter handling of numbers in regexp quantifiers 22ff313 [perl #123814] replace grok_atou with grok_atoUV 73e4395 grok_atoUV: don't make part of API
There are a couple of loose ends that I hope to get to\, such as [perl #123991]\, but I believe that this is already an improvement.
Hugo
@hvds - Status changed from 'open' to 'pending release'
On Monday-201503-09 18:32\, Hugo van der Sanden via RT wrote:
I've now merged this work:
35cd12d [perl #123814] stricter handling of numbers in regexp quantifiers 22ff313 [perl #123814] replace grok_atou with grok_atoUV 73e4395 grok_atoUV: don't make part of API
There are a couple of loose ends that I hope to get to\, such as [perl #123991]\, but I believe that this is already an improvement.
Thanks!
One comment:
+ new_egid = 0; /* XXX is this safe? */ ... + gary[i] = 0; /* XXX is this safe? */
Zero sounds like a bit unsafe for group ids. I would suggest (Gid_t)(-1). Though how portable that is again across OSes is anyone's guess.
Hugo
Jarkko Hietaniemi jhi@iki.fi wrote:
One comment:
+ new_egid = 0; /* XXX is this safe? */ ... + gary[i] = 0; /* XXX is this safe? */
Zero sounds like a bit unsafe for group ids. I would suggest
(Gid_t)(-1)
. Though how portable that is again across OSes is anyone's guess.
Like the below? I assume the define should move to a header somewhere, but I'm not sure which is appropriate.
Is there a todo somewhere to fix the various 'XXX silently ignores failure' comments from b469f1e0?
Hugo
--- a/mg.c
+++ b/mg.c
@@ -3015,6 +3015,9 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
{
/* XXX $) currently silently ignores failures */
Gid_t new_egid;
+#ifndef INVALID_GID
+#define INVALID_GID ((Gid_t)-1)
+#endif
#ifdef HAS_SETGROUPS
{
const char *p = SvPV_const(sv, len);
@@ -3035,7 +3038,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
if (grok_atoUV(p, &uv, &endptr))
new_egid = (Gid_t)uv;
else {
- new_egid = 0; /* XXX is this safe? */
+ new_egid = INVALID_GID;
endptr = NULL;
}
for (i = 0; i < maxgrp; ++i) {
@@ -3053,7 +3056,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
if (grok_atoUV(p, &uv, &endptr))
gary[i] = (Groups_t)uv;
else {
- gary[i] = 0; /* XXX is this safe? */
+ gary[i] = INVALID_GID;
endptr = NULL;
}
}
On Tuesday-201503-10 4:15\, Hugo van der Sanden via RT wrote:
Like the below? I assume the define should move to a header somewhere\, but
Yeah\, that looks right.
On the portability: -1 is often "bad group id"\, and "-2" is "nobody". Notice I said hand-wavingly "often".
I'm not sure which is appropriate.
perl.h\, maybe\, that seems to be a common dumping ground (it really needs some splitting up)\, but now in almost-5.22\, maybe just keep the def in mg.c.
Is there a todo somewhere to fix the various 'XXX silently ignores failure' comments from b469f1e0?
Beyond those XXX markers\, no. The conundrum there is how should a variable assignment (Perl's chosen API here) fail?
I've now pushed 0635704a98:
mg.c:Perl_magic_set: don't use 0 as "failed" gid_t
For [perl #123814] we added checking for grok_* parse failures in
magic_set for $)\, but used 0 as the placeholder result in those
cases (since we don't have an effective way to report an error for
this). (Gid_t)(-1) is a safer placeholder\, since on many systems
that'll map to an explicit bad group id.
Hugo
On Tuesday-201503-10 19:35, Hugo van der Sanden via RT wrote:
I've now pushed 0635704a98:
mg.c:Perl_magic_set: don't use 0 as "failed" gid_t For [perl #123814] we added checking for grok_* parse failures in magic_set for $), but used 0 as the placeholder result in those cases (since we don't have an effective way to report an error for this). (Gid_t)(-1) is a safer placeholder, since on many systems that'll map to an explicit bad group id.
Thanks.
I'll give the blead some smoking love now.
Hugo
On Fri\, Feb 20\, 2015 at 10:52 AM\, Hugo van der Sanden via RT \perlbug\-followup@​perl\.org wrote:
As far as I can see\, the only reference is the captured embed.fnc entry\, it's on the unsupported list; I assume after this lands\, the next update to PPPort will magically remove grok_atou and add grok_atoUV - Matthew\, is that correct?
If it's been removed from embed.fnc and replaced\, the next time we regen the todo files\, etc\, then yeah\, that should go away and grok_atoUV should show up.
Is this something we should do before 5.22 release so it can be included?
-- Matthew Horsfall (alh)
"Matthew Horsfall (alh)" wolfsage@gmail.com wrote:
On Fri, Feb 20, 2015 at 10:52 AM, Hugo van der Sanden via RT perlbug-followup@perl.org wrote:
As far as I can see, the only reference is the captured embed.fnc entry, it's on the unsupported list; I assume after this lands, the next update to PPPort will magically remove grok_atou and add grok_atoUV - Matthew, is that correct?
If it's been removed from embed.fnc and replaced, the next time we regen the todo files, etc, then yeah, that should go away and grok_atoUV should show up.
Is this something we should do before 5.22 release so it can be included?
I'm not sure if by "this" you mean the API change or regen of PPPort.
The code changes have already been pushed; net change over a couple of commits (22ff313068, 73e4395489) is:
-Apdn |UV |grok_atou |NN const char* pv|NULLOK const char** endptr
+EXpn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
.. since we also decided we didn't want to commit immediately to freezing the new interface for the public API.
I certainly think we'd want to regen PPPort before 5.22 release.
Hugo
On Wed\, Mar 11\, 2015 at 4:08 AM\, \hv@​crypt\.org wrote:
I certainly think we'd want to regen PPPort before 5.22 release.
I've just uploaded Devel::PPPort 3.31 which includes the grok_atou removal; if someone doesn't get to it before me in the next few days I'll pull the changes into blead.
Thanks\,
-- Matthew Horsfall (alh)
On Thu\, Mar 12\, 2015 at 10:27 AM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
I've just uploaded Devel::PPPort 3.31 which includes the grok_atou removal; if someone doesn't get to it before me in the next few days I'll pull the changes into blead.
http://perl5.git.perl.org/perl.git/commit/75ddf117c3d998647ee46be0306a5e763ea236aa contains the updated Devel::PPPort\, currently in a branch. If someone could +1 that I'll pull it into blead.
Thanks\,
-- Matthew Horsfall (alh)
On Tue Mar 17 06:47:48 2015\, alh wrote:
http://perl5.git.perl.org/perl.git/commit/75ddf117c3d998647ee46be0306a5e763ea236aa contains the updated Devel::PPPort\, currently in a branch. If someone could +1 that I'll pull it into blead.
I confirm that it passes tests for me\, and as expected no longer mentions grok_atou. I'm not sure if there's other things I should be looking out for.
Hugo
On Wed\, Mar 18\, 2015 at 3:27 PM\, Hugo van der Sanden via RT \perlbug\-followup@​perl\.org wrote:
I confirm that it passes tests for me\, and as expected no longer mentions grok_atou. I'm not sure if there's other things I should be looking out for.
Thanks\, applied as 77f7a5f46952c6d0ba0a3c95af769b3b764bf65a.
-- Matthew Horsfall (alh)
Thank you for submitting this ticket.
The issue should now be resolved with the release today of Perl v5.22\, which is available at http://www.perl.org/get.html -- Karl Williamson for the Perl 5 team
@khwilliamson - Status changed from 'pending release' to 'resolved'
Migrated from rt.perl.org#123814 (status was 'resolved')
Searchable as RT123814$