Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2000-10-26
08:25 • Closed ticket [218580ffff]: system crash when parsing a regexp plus 4 other ... artifact: e15d05025b user: welch
01:02 • New ticket [218580ffff]. artifact: cac1877b9a user: nobody

system crash when parsing a regexp

Closed / Fixed218580ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:02:40
OriginalBugID: 1322 Bug
Version: 8.1b1
SubmitDate: '1999-03-02'
LastModified: '1999-03-26'
Severity: CRIT
Status: Released
Submitter: pat
ChangedBy: rjohnson
OS: Linux
OSVersion: Linux (debian 1.3)
Machine: Other
FixedDate: '1999-03-26'
FixedInVersion: 8.1b3
ClosedDate: '2000-10-25'


Name:
Claude BARRAS

ReproducibleScript:
    $ tclsh8.1
    regexp {[qwer]+|[qw]|[qwer][qwer]|t} str
    
    



ObservedBehavior:
    Program received signal SIGSEGV, Segmentation fault.
    0x400229e9 in uncolorchain (cm=0x8069024, a=0x806ada4)
        at ../generic/regc_color.c:562
    562                     aa->colorchain = a->colorchain;
    (gdb) bt
    #0  0x400229e9 in uncolorchain (cm=0x8069024, a=0x806ada4)
        at ../generic/regc_color.c:562
    #1  0x40023629 in freearc (nfa=0x805b850, victim=0x806ada4)
        at ../generic/regc_nfa.c:327
    #2  0x40023978 in moveouts (nfa=0x805b850, old=0x806ad78, new=0x8069bb0)
        at ../generic/regc_nfa.c:461
    #3  0x40024d5a in unempty (nfa=0x805b850, a=0x8069c30)
        at ../generic/regc_nfa.c:1067
    #4  0x40024bae in fixempties (nfa=0x805b850, f=0x0)
        at ../generic/regc_nfa.c:1013
    #5  0x40023ed5 in optimize (nfa=0x805b850, f=0x0) at
    ../generic/regc_nfa.c:687
    #6  0x40018c76 in TclReComp (re=0x80606e4, string=0xbffff120, len=27,
    flags=3)
        at ./../generic/regcomp.c:409
    #7  0x4008a61c in CompileRegexp (interp=0x804a9e8, 
        string=0x8051568 "[qwer]+|[qw]|[qwer][qwer]|t", length=27, flags=3)
        at ./../generic/tclRegexp.c:768
    
    



DesiredBehavior:
    Doesn't crash with (old) regexp module from Tcl8.0
    





    This problem seems related to several occurences of the same pattern
    and occured originally within a real task of XML parsing
    
This no longer causes a crash.  This was apparently fixed by Henery in
his latest round of bug fixes.  03/26/1999 10:16 - rjohnson -
welch Closed ticket [218580ffff]. [History diff]2000-10-26 08:25:08
Log in (anonymous is fine) to add a comment.