https://bugzilla.redhat.com/show_bug.cgi?id=849703
Bug ID: 849703
QA Contact: extras-qa(a)fedoraproject.org
Severity: unspecified
Version: 16
Priority: unspecified
CC: cweyl(a)alumni.drew.edu, iarnell(a)gmail.com,
jplesnik(a)redhat.com, kasal(a)ucw.cz, lkundrak(a)v3.sk,
mmaslano(a)redhat.com,
perl-devel(a)lists.fedoraproject.org, ppisar(a)redhat.com,
psabata(a)redhat.com, rc040203(a)freenet.de,
tcallawa(a)redhat.com
Assignee: mmaslano(a)redhat.com
Summary: Regular Expression matching in signal handler causes
side-effects
Regression: ---
Story Points: ---
Classification: Fedora
OS: Unspecified
Reporter: tim(a)electronghost.co.uk
Type: Bug
Documentation: ---
Hardware: Unspecified
Mount Type: ---
Status: NEW
Component: perl
Product: Fedora
Description of problem:
Executing an RE inside a PERL deferred signal handler causes an unwanted side
effect on RE-execution in the code that was being executed when the signal
arrived.
Version-Release number of selected component (if applicable):
"This is perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux-thread-multi"
How reproducible:
Always
Steps to Reproduce:
Here is a test case:
====== CUT HERE ======
#!/usr/bin/env perl
sub sighup {
my $bar="This-Has-Dashes-HUP";
$bar=~s/.*-//;
print "$bar\n";
}
$SIG{'HUP'}=\&sighup;
while (1) {
my $foo="This:Has:Colons";
$foo=~s/.*://;
if ($foo=~m/:/) {
print "BUG!!: $foo\n";
}
}
====== CUT HERE ======
Run this endless loop and arrange to send it a SIGHUP once per second.
Actual results:
You will see output like the following:
bash$ perl ./t.pl
HUP
HUP
HUP
HUP
BUG!!: This:Has:Colons
HUP
HUP
BUG!!: This:Has:Colons
HUP
BUG!!: This:Has:Colons
HUP
BUG!!: This:Has:Colons
HUP
HUP
BUG!!: This:Has:Colons
HUP
BUG!!: This:Has:Colons
HUP
HUP
BUG!!: This:Has:Colons
HUP
HUP
HUP
BUG!!: This:Has:Colons
Expected results:
You should get output like this (observed on "This is perl 5, version 12,
subversion 4 (v5.12.4) built for x86_64-linux-thread-multi" from Fedora 15):
bash$ perl ./t.pl
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
HUP
Additional info:
This is not a crash, like 809796, though they are very likely related or the
same problem.
--
You are receiving this mail because:
You are on the CC list for the bug.