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

Missing 'break' in regcomp.c #2234

Closed
p5pRT opened this issue Jul 18, 2000 · 5 comments
Closed

Missing 'break' in regcomp.c #2234

p5pRT opened this issue Jul 18, 2000 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 18, 2000

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

Searchable as RT3550$

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2000

From spp@ds.net

Sorry for the duplicate message, I want this to go into perlbug.

This looks to me like a forgotten 'break' statement in regcomp.c. I came
across it while looking at the earlier question of vertical tab.

This is against 5.6.0 stock.

-spp

Inline Patch
--- perl-5.6.0/regcomp.c        Tue Mar 14 17:19:44 2000
+++ perl-5.6.work/regcomp.c     Tue Jul 18 16:12:54 2000
@@ -2802,6 +2802,7 @@
                        if (strnEQ(posixcc, "space", 5))
                            namedclass =
                                complement ? ANYOF_NSPACE : ANYOF_SPACE;
+                       break;
                    case 'u':
                        if (strnEQ(posixcc, "upper", 5))
                            namedclass =

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2000

From @jhi

On Tue, Jul 18, 2000 at 04​:25​:17PM -0400, Stephen P. Potter wrote​:

Sorry for the duplicate message, I want this to go into perlbug.

This looks to me like a forgotten 'break' statement in regcomp.c. I came
across it while looking at the earlier question of vertical tab.

This is against 5.6.0 stock.

Thanks. (It seems that the test suite is not wide enough, grumble...)

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2000

From @vanstyn

In <20000724051355.E27450@​beta.hut.fi>, Jarkko Hietaniemi writes​:
:On Tue, Jul 18, 2000 at 04​:25​:17PM -0400, Stephen P. Potter wrote​:
:> Sorry for the duplicate message, I want this to go into perlbug.
:>
:> This looks to me like a forgotten 'break' statement in regcomp.c. I came
:> across it while looking at the earlier question of vertical tab.
:>
:> This is against 5.6.0 stock.
:
:Thanks. (It seems that the test suite is not wide enough, grumble...)

Er, what test would have caught this? The missing break allowed it to
drop through to another string compare that would always fail - slightly
maloptimal, but not such as to cause misbehaviour.

Hugo

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2000

From @jhi

On Mon, Jul 24, 2000 at 03​:46​:36AM +0100, Hugo wrote​:

In <20000724051355.E27450@​beta.hut.fi>, Jarkko Hietaniemi writes​:
:On Tue, Jul 18, 2000 at 04​:25​:17PM -0400, Stephen P. Potter wrote​:
:> Sorry for the duplicate message, I want this to go into perlbug.
:>
:> This looks to me like a forgotten 'break' statement in regcomp.c. I came
:> across it while looking at the earlier question of vertical tab.
:>
:> This is against 5.6.0 stock.
:
:Thanks. (It seems that the test suite is not wide enough, grumble...)

Er, what test would have caught this? The missing break allowed it to
drop through to another string compare that would always fail - slightly
maloptimal, but not such as to cause misbehaviour.

Ahhh. Perhaps I should just get some sleep.

@p5pRT
Copy link
Author

p5pRT commented May 5, 2003

@iabyn - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant