Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #94846] Perl crash due to wrong delimiter in PATH env

6 views
Skip to first unread message

Ricardo SIGNES via RT

unread,
Mar 22, 2012, 9:50:15 PM3/22/12
to perl5-...@perl.org
Steve, do you have any news on this?

---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=94846

Father Chrysostomos via RT

unread,
Mar 22, 2012, 11:27:27 PM3/22/12
to perl5-...@perl.org
On Thu Mar 22 18:50:14 2012, rjbs wrote:
> Steve, do you have any news on this?

This seems like an appropriate time for me to say why I made it a
blocker to begin with.

I made it a blocker because it was a patch I couldn’t review, and it
seemed a shame it was being ignored at the time.

Since then, Steve Hay has pointed out problems with (both iterations of)
the patch, and the original poster has not come back with a corrected
version yet.

So, I don’t think it needs to block the release of 5.16.

--

Father Chrysostomos

Steve Hay via RT

unread,
Mar 23, 2012, 1:49:17 PM3/23/12
to perl5-...@perl.org
On Thu Mar 22 20:27:26 2012, sprout wrote:
> On Thu Mar 22 18:50:14 2012, rjbs wrote:
> > Steve, do you have any news on this?
>
> This seems like an appropriate time for me to say why I made it a
> blocker to begin with.
>
> I made it a blocker because it was a patch I couldn’t review, and it
> seemed a shame it was being ignored at the time.
>
> Since then, Steve Hay has pointed out problems with (both iterations of)
> the patch, and the original poster has not come back with a corrected
> version yet.
>
> So, I don’t think it needs to block the release of 5.16.
>

Sorry, I don't have any more news on this really. I was also waiting for
a revised patch from the OP, also with half a mind to take a closer look
myself if that was not forthcoming, but I haven't had a chance yet.

I agree that it shouldn't be a blocker, though. It's not a new
regression, and the crash is only the result of "garbage in" ayway.

The crash arises because the wrong path separator has been used -- ":"
rather than ";". That leads to a string of directory paths not getting
separated, and then the whole string gets a filename appended and is
then passed to -x. And it just so happens that the first directory in
that string is the directory ".", and that character followed by the
wrong path separator character ":" (which should have been ";", of
course) then confuses the code into believing that it's a drive letter
".:" with a letter which it doesn't recognize ("." rather than the more
usual "C", "D", "E", etc).

The following one-liner reproduces the crash:

perl -e "-e '.:'"

as do plenty of other things with garbage where a drive letter was
expected, e.g.

perl -e "-e '1:'"

but it really only arose because of the wrong path separator having been
used in the first place. Perl should handle this better, but I don't see
it as a blocker at all, especially since it isn't new.

James E Keenan via RT

unread,
Feb 3, 2013, 1:15:34 PM2/3/13
to perl5-...@perl.org
On Fri Mar 23 10:49:16 2012, shay wrote:
> On Thu Mar 22 20:27:26 2012, sprout wrote:
> > On Thu Mar 22 18:50:14 2012, rjbs wrote:
> > > Steve, do you have any news on this?
>
> Sorry, I don't have any more news on this really. I was also waiting for
> a revised patch from the OP, also with half a mind to take a closer look
> myself if that was not forthcoming, but I haven't had a chance yet.
>
> I agree that it shouldn't be a blocker, though. It's not a new
> regression, and the crash is only the result of "garbage in" ayway.
>
> The crash arises because the wrong path separator has been used -- ":"
> rather than ";". That leads to a string of directory paths not getting
> separated, and then the whole string gets a filename appended and is
> then passed to -x. And it just so happens that the first directory in
> that string is the directory ".", and that character followed by the
> wrong path separator character ":" (which should have been ";", of
> course) then confuses the code into believing that it's a drive letter
> ".:" with a letter which it doesn't recognize ("." rather than the more
> usual "C", "D", "E", etc).
>
> The following one-liner reproduces the crash:
>
> perl -e "-e '.:'"
>
> as do plenty of other things with garbage where a drive letter was
> expected, e.g.
>
> perl -e "-e '1:'"
>
> but it really only arose because of the wrong path separator having been
> used in the first place. Perl should handle this better, but I don't see
> it as a blocker at all, especially since it isn't new.

I don't get these segfaults with Perl 5.16.0 on Darwin.

#####
$ perl -e "-e '.:'"
$ perl -e "-e '1:'"
#####

Is it possible this was a Win32-only bug?

Thank you very much.
Jim Keenan

bulk88 via RT

unread,
Feb 3, 2013, 3:59:06 PM2/3/13
to perl5-...@perl.org
On Fri Mar 23 10:49:16 2012, shay wrote:
> The following one-liner reproduces the crash:
>
> perl -e "-e '.:'"
>
> as do plenty of other things with garbage where a drive letter was
> expected, e.g.
>
> perl -e "-e '1:'"
>
> but it really only arose because of the wrong path separator having been
> used in the first place. Perl should handle this better, but I don't see
> it as a blocker at all, especially since it isn't new.

Can not reproduce with ActivePerl 5.10 or 5.17.7. I ran "perl -e "-e
'1:'"" no path changes.
--
bulk88 ~ bulk88 at hotmail.com

Steve Hay

unread,
Feb 4, 2013, 3:54:28 AM2/4/13
to perlbug-...@perl.org, perl5-...@perl.org
I'm not sure I ever saw it crash, actually -- but if you step through it in the debugger you will see it doing things it shouldn't really be doing and it seemed just a fluke that it didn't crash: see my reply from 3 Nov 2011.
0 new messages