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

Regular expression bug (5.00561) #477

Closed
p5pRT opened this issue Sep 6, 1999 · 28 comments
Closed

Regular expression bug (5.00561) #477

p5pRT opened this issue Sep 6, 1999 · 28 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Sep 6, 1999

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

Searchable as RT1318$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 6, 1999

From ed_peschko@csgsystems.com

$line = ('a' x 99999) . "'" . ('a' x 20000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";

(in other words, if one is looking for a single string with possible
escaped single quotes
and the search fails on a long string, it cores..).

Ed

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

(From perlbug 19990906.001)

$line = ('a' x 99999) . ";'"; . ('a' x 20000);
$line =~ m";(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";;

(in other words, if one is looking for a single string with possible
escaped single quotes
and the search fails on a long string, it cores..).

Ed

Below is a patch to t/run/kill_perl.t to ensure it doesn't creep in
again.

Bug closed.

--- t/run/kill_perl.t 2001/10/30 03​:31​:32 1.1
+++ t/run/kill_perl.t 2001/10/30 03​:32​:22
@​@​ -809,3 +809,9 @​@​
EXPECT
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
+######## [ID 19990906.001]
+$line = ('a' x 99999) . ";'"; . ('a' x 20000);
+$line =~ m";(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";;
+print "ok\n";
+EXPECT
+ok

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
<Skrewtape> I've heard that semen tastes different depending on diet. Is that
  true?
<Skrewtape> Hello?
<Schwern> Skrewtape​: Hang on, I'm conducting research.

1 similar comment
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

(From perlbug 19990906.001)

$line = ('a' x 99999) . ";'"; . ('a' x 20000);
$line =~ m";(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";;

(in other words, if one is looking for a single string with possible
escaped single quotes
and the search fails on a long string, it cores..).

Ed

Below is a patch to t/run/kill_perl.t to ensure it doesn't creep in
again.

Bug closed.

--- t/run/kill_perl.t 2001/10/30 03​:31​:32 1.1
+++ t/run/kill_perl.t 2001/10/30 03​:32​:22
@​@​ -809,3 +809,9 @​@​
EXPECT
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
+######## [ID 19990906.001]
+$line = ('a' x 99999) . ";'"; . ('a' x 20000);
+$line =~ m";(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";;
+print "ok\n";
+EXPECT
+ok

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
<Skrewtape> I've heard that semen tastes different depending on diet. Is that
  true?
<Skrewtape> Hello?
<Schwern> Skrewtape​: Hang on, I'm conducting research.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @jhi

Thanks, applied. Though I still think someone should go in with a
pitchfork and clean out kill_perl.t, sorting the tests to other test
script. 95% of it doesn't belong there. "Crashes Perl (or Used To)"
is not a really useful classifying criterion, it's about as useful as
"the number of characters in the test is divisible by 73". The new
added test is, for example, most likely prime op/pat material.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

Except that !(length $test % 73) doesn't cause the rest of the tests to
not run (or perhaps crash Windows).

The new added test is, for example, most likely prime op/pat
material.

Yes, it is. However as the bug is still in flux, having flip-flopped
between working and not working the last two weeks, I don't want to
start making op/pat.t abort just yet.

kill_perl.t is a dumping ground, but when you want to write a quick
test it's nice to have a heap to throw it onto. Better that than
chasing a bug for two years because nobody wanted to write a proper
test for it.

But, like any compost heap, it needs turning over once in a while. My
pitchfork is currently poking at perlbug's bottom. If anyone wants to
take a stab at dusting off kill_perl, first pass should probably be to
remove stuff that never actually killed perl (from when it was
t/op/misc.t).

1) Start at the top of the list (presumably those are the oldest).
2) Run the test against older perls (like 5.004), see if it causes
  a segfault.
3a) If not, move it to the appropriate place.
3b) If so, and it was a really old perl, move it.
3c) If so, and it was a recent perl, leave it.

I suspect the majority will turn out to not be segfaulting on anything
like a modern perl.

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
Let's leave my ass out of this, shall we?

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From [Unknown Contact. See original ticket]

$line = ('a' x 99999) . "'" . ('a' x 20000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";

(in other words, if one is looking for a single string with possible
escaped single quotes
and the search fails on a long string, it cores..).

Ed

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @jhi

Talk with Nick Clark about arithmetic operators like % and you'll
become very afraid :-)

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @andk

  > Thanks, applied.

It seems you're talking 12776. I didn't see Schwern's posting, but
something's wrng here. Unless it's lack of coffeine, I can see the
syntax error.

t/run/kill_perl.....................# PROG​:
$line = ('a' x 99999) . ";'"; . ('a' x 20000);
$line =~ m";(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";;
print "ok\n";
# EXPECTED​:
ok
# GOT​:
syntax error at - line 1, near "; ."
Execution of - aborted due to compilation errors.
FAILED at test 88

--
andreas

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

Sorry, ran diff with brain in neutral.

THIS is the proper patch.

--- t/run/kill_perl.t 2001/10/30 03​:31​:32 1.1
+++ t/run/kill_perl.t 2001/10/30 03​:59​:10
@​@​ -809,3 +809,10 @​@​
EXPECT
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
+######## segfault on regex search fail of long string [ID 19990906.001]
+$line = ('a' x 99999) . "'" . ('a' x 20000);
+$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";
+print "ok\n";
+EXPECT
+ok
+

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
<purl> Hey Schwern! honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk!

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @jhi

Argh. True. And if I dig up the *original* lines from the
bug report​:

$line = ('a' x 99999) . "'" . ('a' x 20000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";

we still get a stack overflow core.

--
andreas

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @jhi

Yup, and that still blows off the stack.

+print "ok\n";
+EXPECT
+ok
+

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

Odd, doesn't for me. perl -V follows.

Here's a variant of that test patch which makes this test TODO.

--- t/run/kill_perl.t 2001/10/30 03​:31​:32 1.1
+++ t/run/kill_perl.t 2001/10/30 05​:16​:59
@​@​ -15,6 +15,8 @​@​
# error, rather than just segfaulting as reported in perlbug ID
# 20020831.001
#
+# Any test with the word "TODO" in it's name will be made into a todo
+# test (ie. not cause "make test" to fail).
#
# NOTE​: Please don't add tests to this file unless they *need* to be
# run in separate executable and can't simply use eval.
@​@​ -30,8 +32,10 @​@​

my @​prgs = ();
while(<DATA>) {
- if(m/^#{8,}\s*(.*)/) {
- push @​prgs, ['', $1];
+ if(m/^#{8,}\s*(.*)/) {
+ my $name = $1;
+ my $todo = $name =~ s/TODO\s*//;
+ push @​prgs, ['', $name, $todo];
  }
  else {
  $prgs[-1][0] .= $_;
@​@​ -45,7 +49,7 @​@​

my $test = 1;
foreach my $prog (@​prgs) {
- my($raw_prog, $name) = @​$prog;
+ my($raw_prog, $name, $todo) = @​$prog;

  my $switch;
  if ($raw_prog =~ s/^\s*(-\w.*)//){
@​@​ -108,8 +112,9 @​@​
  print STDERR "# EXPECTED​:\n$expected\n";
  print STDERR "# GOT​:\n$results\n";
  }
- printf "%sok %d%s\n", ($ok ? '' : "not "), $test,
- length $name ? " - $name" : $name;
+ printf "%sok %d%s%s\n", ($ok ? '' : "not "), $test,
+ length $name ? " - $name" : $name,
+ $todo ? ' # TODO' : '';
  $test++;
}

@​@​ -809,3 +814,10 @​@​
EXPECT
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
+######## TODO segfault on regex search fail of long string [ID 19990906.001]
+$line = ('a' x 99999) . "'" . ('a' x 20000);
+$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";
+print "ok\n";
+EXPECT
+ok
+

Summary of my perl5 (revision 5.0 version 7 subversion 2 patch 12773) configuration​:
  Platform​:
  osname=linux, osvers=2.4.13-pre3-ben0, archname=ppc-linux
  uname='linux blackrider 2.4.13-pre3-ben0 #1 fri oct 19 17​:11​:52 edt 2001 ppc unknown '
  config_args='-des -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=define
  Compiler​:
  cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fno-strict-aliasing -I/usr/local/include'
  ccversion='', gccversion='2.95.4 20011006 (Debian prerelease)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
  perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
  libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: USE_LARGE_FILES
  Locally applied patches​:
  DEVEL12767
  Built under linux
  Compiled at Oct 29 2001 22​:35​:45
  @​INC​:
  lib
  /usr/local/lib/perl5/5.7.2/ppc-linux
  /usr/local/lib/perl5/5.7.2
  /usr/local/lib/perl5/site_perl/5.7.2/ppc-linux
  /usr/local/lib/perl5/site_perl/5.7.2
  /usr/local/lib/perl5/site_perl
  .

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
Try explaining that to my brain which is currently ON FIRE!
  http​://www.goats.com/archive/010704.html

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @jhi

Does for me in tru64 and linux/x86. Solaris/sparc doesn't.

But hmmm... yup, dropping the stack limit in Solaris to 7MB (from 8MB)
does result in a coredump.

Lesson​: absence of evidence does not evidence of absence make.
(There's quite probably something you forgot.)

Here's a variant of that test patch which makes this test TODO.

Hmmm, I hope we have core dump cleanup (and not just "core") going on
at all/most directory levels when 'make distclean'​:ing...

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

Ok, extending the size of the string causes it to core here.
Guess I'll reopen that bug.

--- t/run/kill_perl.t 2001/10/30 05​:35​:40 1.2
+++ t/run/kill_perl.t 2001/10/30 05​:35​:43
@​@​ -815,7 +815,7 @​@​
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
######## TODO segfault on regex search fail of long string [ID 19990906.001]
-$line = ('a' x 99999) . "'" . ('a' x 20000);
+$line = ('a' x 999999) . "'" . ('a' x 200000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";
print "ok\n";
EXPECT

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
navy ritual​:
first caulk the boards of the deck,
then plug up my ass.
  -- japhy

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From [Unknown Contact. See original ticket]

$line = ('a' x 99999) . "'" . ('a' x 20000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";

(in other words, if one is looking for a single string with possible
escaped single quotes
and the search fails on a long string, it cores..).

Ed

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 29, 2001

From @schwern

$line = ('a' x 999999) . "'" . ('a' x 200000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
"You killed my fish?"
"Why does that pickle you?"
  http​://sluggy.com/d/010204.html

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @nwc10

Are there just 3 classes of tests?

1​: Things that go wrong that really need a clean new copy of perl run to
  demonstrate the problem, and can't be done in eval or the like
2​: Things that cause a SEGV, that we'd like to run in a new copy of perl so
  that we get complete results from harness, rather than just the first
  not OK.
3​: Things that are "misc" because it's not obvious where to put the test.

So do we want a kill_perl and a clean_perl test, and sweep out all the
"misc"s to proper homes?

Along with comments for each subtest justifying why it needs the slow startup
of a clean perl.

Nicholas Clark

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @jhi

I'm still not happy with including this test. Even though t/TEST
happily concedes that's it's a todo, this is what it looks like for
me​:

t/run/kill_perl.....................Stack overflow​: pid 14353, proc perl, addr 0x11fdfffb0, pc 0x3ffbff787f0
Core​: cannot create core file -- system version limit (1) reached.
sh​: 14353 Memory fault
# PROG​:
$line = ('a' x 999999) . "'" . ('a' x 200000);
$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";
print "ok\n";
# EXPECTED​:
ok
# GOT​:

ok
t/run/runenv........................ok

And I'm certain other places will have similarly unpleasant displays.
It's hard to imagine the user nodding wisely "yeah, they are still
working on it, I understand" after seeing something like the above.

Yes, I know it's slightly odd from QA viewpoint to refuse not to
include a test "just because in its unsolved state it 'looks bad'".

But what I am to do? Include few dozen tests that core dump with
drivel like the above, in some environments core dumping fills the
screen with neato hexadecimal register dumps, and the funniest of all,
in non-MMU environments (yes, Perl does run in such strange lands)
*the testing will stop right there since Perl just crashed the whole
box*, and still expect users to be gratified to see the results? (Or
power cycle.) "Yes, Phyllis, Perl seems to be fine, it core dumped on
me only seven times while testing."

Maybe we should have a new (non-.t) dumping ground for these tests, that
is *not* run unless explicitly asked so? $ENV{PERL_TEST_DIRTY_SECRETS}?

--- t/run/kill_perl.t 2001/10/30 03​:31​:32 1.1
+++ t/run/kill_perl.t 2001/10/30 05​:16​:59
@​@​ -15,6 +15,8 @​@​
# error, rather than just segfaulting as reported in perlbug ID
# 20020831.001
#
+# Any test with the word "TODO" in it's name will be made into a todo
+# test (ie. not cause "make test" to fail).
#
# NOTE​: Please don't add tests to this file unless they *need* to be
# run in separate executable and can't simply use eval.
@​@​ -30,8 +32,10 @​@​

my @​prgs = ();
while(<DATA>) {
- if(m/^#{8,}\s*(.*)/) {
- push @​prgs, ['', $1];
+ if(m/^#{8,}\s*(.*)/) {
+ my $name = $1;
+ my $todo = $name =~ s/TODO\s*//;
+ push @​prgs, ['', $name, $todo];
}
else {
$prgs[-1][0] .= $_;
@​@​ -45,7 +49,7 @​@​

my $test = 1;
foreach my $prog (@​prgs) {
- my($raw_prog, $name) = @​$prog;
+ my($raw_prog, $name, $todo) = @​$prog;

 my $switch;
 if \($raw\_prog =~ s/^\\s\*\(\-\\w\.\*\)//\)\{

@​@​ -108,8 +112,9 @​@​
print STDERR "# EXPECTED​:\n$expected\n";
print STDERR "# GOT​:\n$results\n";
}
- printf "%sok %d%s\n", ($ok ? '' : "not "), $test,
- length $name ? " - $name" : $name;
+ printf "%sok %d%s%s\n", ($ok ? '' : "not "), $test,
+ length $name ? " - $name" : $name,
+ $todo ? ' # TODO' : '';
$test++;
}

@​@​ -809,3 +814,10 @​@​
EXPECT
Can't modify constant item in read at - line 1, near "1)"
Execution of - aborted due to compilation errors.
+######## TODO segfault on regex search fail of long string [ID 19990906.001]
+$line = ('a' x 99999) . "'" . ('a' x 20000);
+$line =~ m"(?​:\s*\'(?​:[^\\']|\\.)*\'\s*)";
+print "ok\n";
+EXPECT
+ok
+

Summary of my perl5 (revision 5.0 version 7 subversion 2 patch 12773) configuration​:
Platform​:
osname=linux, osvers=2.4.13-pre3-ben0, archname=ppc-linux
uname='linux blackrider 2.4.13-pre3-ben0 #1 fri oct 19 17​:11​:52 edt 2001 ppc unknown '
config_args='-des -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=define
Compiler​:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4 20011006 (Debian prerelease)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
Compile-time options​: USE_LARGE_FILES
Locally applied patches​:
DEVEL12767
Built under linux
Compiled at Oct 29 2001 22​:35​:45
@​INC​:
lib
/usr/local/lib/perl5/5.7.2/ppc-linux
/usr/local/lib/perl5/5.7.2
/usr/local/lib/perl5/site_perl/5.7.2/ppc-linux
/usr/local/lib/perl5/site_perl/5.7.2
/usr/local/lib/perl5/site_perl
.

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl6 Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
Try explaining that to my brain which is currently ON FIRE!
http​://www.goats.com/archive/010704.html

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @jhi

Sounds about right.

Along with comments for each subtest justifying why it needs the slow startup
of a clean perl.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @nwc10

This makes it seem reasonable​:

But what I am to do? Include few dozen tests that core dump with
drivel like the above, in some environments core dumping fills the
screen with neato hexadecimal register dumps, and the funniest of all,
in non-MMU environments (yes, Perl does run in such strange lands)
*the testing will stop right there since Perl just crashed the whole
box*, and still expect users to be gratified to see the results? (Or
power cycle.) "Yes, Phyllis, Perl seems to be fine, it core dumped on
me only seven times while testing."

Maybe we should have a new (non-.t) dumping ground for these tests, that
is *not* run unless explicitly asked so? $ENV{PERL_TEST_DIRTY_SECRETS}?

#!./perl

BEGIN {
  chdir "t" if -d "t";
  @​INC = qw(. ../lib);
}

use strict;
use Config;

BEGIN {
  unless ($Config{runcoredumpingtests}) {
  print "1..0\n";
  exit;
  }
}

and then run each of them in a separate child perl interpreter.

Nicholas Clark

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From [Unknown Contact. See original ticket]

The child interpreter land does have great promises for Safe in the future, but I wouldn't know how to catch segfaults! They tend to
affect the entire program space.

Arthur

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @jhi

That could work.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @nwc10

and then run each of them in a separate child perl interpreter.

The child interpreter land does have great promises for Safe in the future, but I wouldn't know how to catch segfaults! They tend to
affect the entire program space.

Sorry, wasn't clear. The idea was that every test would run, so that harness
gets back ok/not ok from all tests, even if some of the early ones go SEGV.
If you run all the subtests from one perl interpreter then the first that
makes it go SEGV has the unfortunate side effect of preventing the other
tests from running.

Nicholas Clark

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From [Unknown Contact. See original ticket]

Perhaps even turn it on by default if -Dusedevel, so that
bleadperl developers (who should know what to expect) will
be reminded of the problems?

-- BKS

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http​://personals.yahoo.com

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @jhi

Yes, reusing (or extending) the $Config{usedevel} for this
new semantic would be fine.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 30, 2001

From @nwc10

usedevel didn't seem to be in config.sh when I had a look on one of my
recent bleadperl builds. However, it's as in config.sh as runcoredumpingtests
and I suspect that $Config{usedevel} is a much better name for it.

Nicholas Clark

@p5pRT p5pRT closed this Dec 16, 2002
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 16, 2002

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

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Nov 28, 2003

From The RT System itself

replicated on linux running bleadperl DEVEL7093

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

Successfully merging a pull request may close this issue.

None yet
1 participant