Tcl Source Code

View Ticket
Login
Ticket UUID: 2d34167e97fecb82260e9beab4c975877b09b2d4
Title: sporadic segfault in stack test-case (heisenbug)
Type: Bug Created on: 2019-03-06 11:52:31
Submitter: sebres Assigned to: nobody
Subsystem: 45. Parsing and Eval Severity: Important
Priority: 5 Medium Last modified: 2019-04-03 14:36:30
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: >= 8.5
Description:

Just for the record.

It looks really as a heisenbug (not reproducible at all). But I saw it also at some point on my systems (8.5/8.6).

Here the last time in travis:

==== stack-3.1 enough room for regexp near recursion limit FAILED
==== Contents of test case:
    # do this in a sub process in case it segfaults
    exec [interpreter] << {
	interp recursionlimit {} 10000
	set depth 0
	proc a { max } {
	    if { [info level] < $max } {
		set ::depth [info level]
		a $max
	    } else {
		regexp {^ ?} x
	    }
	}
	catch { a 10001 }
	set depth2 $depth
	puts [list [a $depth] [expr { $depth2 - $depth }]]
    }
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: child killed: segmentation violation
    while executing
"exec [interpreter] << {
	interp recursionlimit {} 10000
	set depth 0
	proc a { max } {
	    if { [info level] < $max } {
		set ::depth [info level]
		..."
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $script"
---- errorCode: CHILDKILLED 7162 SIGSEGV {segmentation violation}
==== stack-3.1 FAILED

User Comments:
sebres added on 2019-04-03 14:36:30:

Next one, same test and again clang (BTW, I think I don't saw it compiled with gcc, so possibly it'd be an UB compiled with clang C on some constellation).