[Bug 849703] New: Regular Expression matching in signal handler causes side-effects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=849703

            Bug ID: 849703
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
          Severity: unspecified
           Version: 16
          Priority: unspecified
                CC: cweyl@xxxxxxxxxxxxxxx, iarnell@xxxxxxxxx,
                    jplesnik@xxxxxxxxxx, kasal@xxxxxx, lkundrak@xxxxx,
                    mmaslano@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx,
                    psabata@xxxxxxxxxx, rc040203@xxxxxxxxxx,
                    tcallawa@xxxxxxxxxx
          Assignee: mmaslano@xxxxxxxxxx
           Summary: Regular Expression matching in signal handler causes
                    side-effects
        Regression: ---
      Story Points: ---
    Classification: Fedora
                OS: Unspecified
          Reporter: tim@xxxxxxxxxxxxxxxxxxx
              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.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux