Overview
| Artifact ID: | 4ff11818267bc4bcc790251603c810c6f4b77725 |
|---|---|
| Ticket: | 217984ffffffffffffffffffffffffffffffffff
variable is not checked correctly in stopping condition of w |
| User & Date: | nobody on 2000-10-26 00:47:09 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 5965 Bug Version: 8.3.1 SubmitDate: '2000-06-29' LastModified: '2000-06-30' Severity: SER Status: Closed Submitter: techsupp ChangedBy: ericm RelatedBugIDs: 5964 OS: Linux OSVersion: linux kernel 2.2.14, TCL built with GCC (egcs-2.91.66) Machine: i386 FixedDate: '2000-06-30' ClosedDate: '2000-10-25' Name: thomas park Extensions: none CustomShell: none Comments: also observed bug in TCL v. 8.0.4 ReproducibleScript: This is a proc that creates a unique filename based on POSIX time, with a monotonic numerical extension if there was already a file created that second. The error occurs when the script has already created a file: proc get_ref_id { } { # ns_time gives POSIX time set ref_no [ format %x [ ns_time ] ] set base_ref "" append base_ref [msg_path] $ref_no set ref_id $base_ref set suffix 0 while [ set result [file exists $ref_id] ] { # DEBUG puts [ concat "ref_id is" $ref_id ] puts [ concat "exists gives" [file exists $ref_id] ] puts [ concat "result is" $result ] set ref_id "" append ref_id $base_ref "." $suffix set suffix [ incr suffix ] } return [ list $ref_id $ref_no ] } ObservedBehavior: infinite loop. although the file DOESN'T exist, the while loops infinitely. ... ref_id is /usr/local/crm/395b4604.1811 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1812 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1813 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1814 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1815 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1816 exists gives 0 result is 1 ref_id is /usr/local/crm/395b4604.1817 exists gives 0 result is 1 ... DesiredBehavior: when the while loop iterates, i would expect red_id (which was set in the while loop) to be evaluated with the new value in the while condition! - foundin changed to: "obsolete: 8.3.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
variable is not checked correctly in stopping condition of w
- type changed to: "Bug"