Skip to content
Tcl Source Code View Ticket
Login

View Ticket

io-75.14 fails under valgrind

Closed / Fixedb630fc4fddbdebdfd166b450643adae747ad3497Created 3 years agoUpdated 3 years ago
Descriptionplain2023-07-14 16:47:54
I see `make valgrind` of core-8 branch produce...

==== io-75.14 [gets] succesfully returns lines prior to error

        invalid utf-8 encoding [gets] continues in non-strict mode after error FAILED
==== Contents of test case:

    lappend res [gets $chan]
    lappend res [gets $chan]
    lappend res [catch {gets $chan} cres] $cres
    chan configure $chan -profile tcl8
    lappend res [gets $chan]
    lappend res [gets $chan]
    close $chan
    return $res

---- Result was:
-1 ret-1 0 ret0 1 ret1 2 ret2 3 ret3 4 ret4 5 ret5 a b 1 {error reading "file5": invalid or incomplete multibyte or wide character} c\xC0 d
---- Result should have been (glob matching):
a b 1 {error reading "*": invalid or incomplete multibyte or wide character} c\xC0 d
==== io-75.14 FAILED


This suggests the test is [lappend]ing onto a $res that starts with a non
empty list value.  The simple fix for this would be a -setup the initializes
to the empty list the test expects.

That said, it is a mystery to me why the failure only shows up under valgrind
testing and not all the time.
dgpplain2023-08-04 13:32:52
I see this is cleaned up now.  FYI, the failure indicates that this
was interference with the test interp-26.6
Log in (anonymous is fine) to add a comment.