View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000704 | 1003.1(2013)/Issue7+TC1 | System Interfaces | public | 2013-05-31 15:45 | 2019-06-10 08:55 |
| Reporter | steffen | Assigned To | |||
| Priority | normal | Severity | Editorial | Type | Clarification Requested |
| Status | Closed | Resolution | Accepted As Marked | ||
| Name | Steffen Nurpmeso | ||||
| Organization | |||||
| User Reference | |||||
| Section | XSH, chapter 3 - wordexp, wordfree | ||||
| Page Number | 2281 | ||||
| Line Number | 72240-72243 | ||||
| Interp Status | Approved | ||||
| Final Accepted Text | 0000704:0001646 | ||||
| Summary | 0000704: Clarify interoperability of wordfree(3) | ||||
| Description | It seems the wording of wordexp(3) / wordfree(3) permits the interpretation that wordfree(3) is only valid after a _successful_ wordexp(3) call. (Apple Mac OS X Snow Leopard behaves that way if one globbers the wordexp_t backing memory before calling wordexp(3), whereas the checked sources of FreeBSD [since first commit 2002] and NetBSD [ditto, 2004] zero the backing memory unless WRDE_APPEND is set, as i'd expected.) | ||||
| Desired Action | On page 2281, paragraph lines 72240-72243, change, on line 72243 In other cases, they shall not be modified. to In other cases, they shall not be modified except as required for proper subsequent usage of pwordexp; i.e., a subsequent call to wordexp() with the WRDE_APPEND flag or a call to wordfree() shall behave. | ||||
| Tags | tc2-2008 | ||||
|
|
Interpretation response ------------------------ The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: ------------- The standard is clear that wordfree() can be called after any wordexp() call, not just successful ones (Lines 72184-72185 do not contain the word "successful"). However, the last sentence of the first paragraph of the RETURN VALUES section (line 72243) states: "In other cases, they shall not be modified.", but it is not clear whether "other cases" here refers to all cases other than when wordexp() returns WRDE_NOSPACE (including success) or just to error cases other than WRDE_NOSPACE. And, neither of these possibilities matches the intended behavior. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- On page 2281 line 72243, change: In other cases, they shall not be modified. to: In other error cases, if the WRDE_APPEND flag was specified, pwordexp->we_wordc and pwordexp->we_wordv shall not be modified. Add after page 2281 line 72230: The results are unspecified if WRDE_APPEND and WRDE_REUSE are both specified. |
|
|
Interpretation Proposed 6 Sep 2013 |
|
|
Interpretation approved 14 October 2013 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-05-31 15:45 | steffen | New Issue | |
| 2013-05-31 15:45 | steffen | Name | => Steffen Nurpmeso |
| 2013-05-31 15:45 | steffen | Section | => XSH, chapter 3 - wordexp, wordfree |
| 2013-05-31 15:45 | steffen | Page Number | => 2281 |
| 2013-05-31 15:45 | steffen | Line Number | => 72240-72243 |
| 2013-06-06 16:15 | rhansen | Note Added: 0001646 | |
| 2013-06-06 16:24 | msbrown | Note Edited: 0001646 | |
| 2013-06-06 16:25 | msbrown | Note Edited: 0001646 | |
| 2013-06-06 16:27 | msbrown | Note Edited: 0001646 | |
| 2013-06-06 16:34 | msbrown | Note Edited: 0001646 | |
| 2013-06-06 16:36 | msbrown | Note Edited: 0001646 | |
| 2013-06-06 16:37 | msbrown | Interp Status | => Proposed |
| 2013-06-06 16:37 | msbrown | Final Accepted Text | => 0000704:0001646 |
| 2013-06-06 16:37 | msbrown | Status | New => Interpretation Required |
| 2013-06-06 16:37 | msbrown | Resolution | Open => Accepted As Marked |
| 2013-06-06 16:37 | msbrown | Tag Attached: tc2-2008 | |
| 2013-06-06 16:38 | msbrown | Interp Status | Proposed => Pending |
| 2013-06-13 15:12 |
|
Note Edited: 0001646 | |
| 2013-06-13 15:13 |
|
Note Edited: 0001646 | |
| 2013-09-06 04:55 | ajosey | Interp Status | Pending => Proposed |
| 2013-09-06 04:55 | ajosey | Note Added: 0001809 | |
| 2013-10-14 13:07 | ajosey | Interp Status | Proposed => Approved |
| 2013-10-14 13:07 | ajosey | Note Added: 0001892 | |
| 2019-06-10 08:55 | agadmin | Status | Interpretation Required => Closed |