Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c15be4499a1ad00161eb54b50a53c49141178adad8b0c1f50ce417cfa2db53b5
Ticket: 96e5c814eb9ed95591ce30904943025c35673a96
Signed integer overflow in Clock_str2wideInt()
User & Date: cdubois on 2026-01-06 03:56:16
Changes

  1. icomment:
    I’d like to help make this UBSan-clean. Based on sebres’ note, it seems the current logic is fine but UBSan is flagging intermediate signed overflow.
    
    Do you have a preferred direction for addressing this — e.g., restructuring the arithmetic to avoid overflow in signed space (pre-checks / bounds checks), or another approach you consider idiomatic here?
    
    If you’re OK with it, I can draft a patch and validate it with UBSan, focusing on the reported tests (clock-6.9/6.10/6.10a).
    
  2. login: "cdubois"
  3. mimetype: "text/plain"