Overview
| Artifact ID: | 32d512be5bb9e41561b12be67c5d6d27f5dcabae |
|---|---|
| Ticket: | 219012ffffffffffffffffffffffffffffffffff
tmpnam limitation |
| User & Date: | nobody on 2000-10-26 01:09:18 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 3911 Bug Version: 8.2 SubmitDate: '1999-12-21' LastModified: '2000-03-31' Severity: SER Status: Released Submitter: techsupp ChangedBy: ericm OS: Linux Machine: IBM PC/AT compatible FixedDate: '2000-03-31' FixedInVersion: 8.3.1 ClosedDate: '2000-10-25' Name: Hiroshi Kasai CustomShell: JP patch Comments: Precisely, I found this bug in tcl7.6. But, it is same as in tcl8.2. If you use a function 'exec' or 'open "|..."', tcl calls a function 'tmpnam'. This function has a limitation. It is defined in stdio.h as #define TMP_MAX 238328 This is a maximum number of calls for the function 'tmpnam'. If it gets over, the function returns NULL. But, the function is used as char fileName[L_tmpnam]; tmpnam(fileName); The 'fileName' is local variable. So, if 'tmpnam' returned NULL, 'fileName' value is not changed. And more, the variable is not initialized because it is local, Nothing happens if it is lucky.An error is indicated if it has bad luck a little. When it is the worst, if the variable has a exist file name, the file is destroyed. It is to redirect standard error output specifically to avoid this. ReproducibleScript: open "|command" exec command ObservedBehavior: couldn't create error file : no such file or directory Thanks for pointing this out. I added a test for a NULL return from tmpnam, which will solve this problem on Linux and should be non-harmful on other UNIX (Solaris and HP-UX both follow a different convention when TMP_MAX is exceeded). This fix will go out with 8.3.1. - eric -- 03/31/2000 ericm
- foundin changed to: "obsolete: 8.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "60. NRE and coroutines"
- title changed to: "tmpnam limitation"
- type changed to: "Bug"