Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d3aaa2ac9bd2814443256606e766903d316fab2bc95c4f5719eb2054dfee09e6
Ticket: 95e287b956e7b1dd2d03729fe27d38574e4f3d12
uninit value use in stringObj-4.2
User & Date: jan.nijtmans on 2023-03-08 14:33:17
Changes

  1. closedate changed to: "2460012.10645255"
  2. closer changed to: "jan.nijtmans"
  3. icomment:
    > What do you think of an alternative solution where stringObj-4.2 is not modified, but is constrained so that test is skipped in a valgrind run?
    
    Yes, I considered that. But ... uninitialized memory can contain anything. If the memory happens to contain a valid multy-byte UTF-8 sequence (e.g. 0xC0 0x80), then "teststringobj length2 1" will return a value < 10 and the test fails. This shows the test is bogus anyway.
    
    What could be done is change "teststringobj setlength" such that when the length is increased compared to the previous length, then the memory is filled with something (e.g. all 0-bytes). That would make stringObj-4.2 predictable, and it would also solve this valgrind issue.
    
  4. login: "jan.nijtmans"
  5. mimetype: "text/plain"