View Issue Details

IDProjectCategoryView StatusLast Update
00007251003.1(2008)/Issue 7System Interfacespublic2013-08-01 15:53
ReporterSteve_Bartolomei Assigned Toajosey  
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionRejected 
NameSteve Bartolomei
OrganizationLynuxWorks, Inc.
User Reference
Sectionpthread_setcancelstate, pthread_setcanceltype
Page Number1709
Line Number55195
Interp Status---
Final Accepted Text
Summary0000725: No EFAULT error code is specified even though pthread_setcancel*() take a pointer argument.
DescriptionThe pthread_setcancelstate() and pthread_setcanceltype() routines both take a pointer as their second argument. Yet, in the ERRORS section they do not specify EFAULT as a valid error code.
Desired ActionAdd EFAULT to the list of valid error codes.
TagsNo tags attached.

Activities

eblake

2013-07-20 02:02

manager   bugnote:0001690

Sorry, EFAULT is specifically not standardized. Implementations are free to use that error for any pointer that they choose to diagnose as invalid, but the standard is unable to require it for ANY interface, because it is too prohibitive to be implemented across all architectures that strive for standards compliance.

eblake

2013-08-01 15:51

manager   bugnote:0001693

Last edited: 2013-08-01 15:56

To expand on 0000725:0001690, EFAULT is listed as a defined error (see XBD <errno.h>, page 235 line 7755; XSH 2.3 page 483 line 16408), but it is not referenced in the error list of any existing function. Adding it as a may fail for just pthread_setcancel*() would be inappropriate - if we added it, we would have to audit ALL interfaces where it would need to be added.

See also XSH 2.3 (page 481 line 16312): "Implementations may support additional errors not included in this list," which gives implementations the right to return EFAULT even though the standard does not list it, and XRAT B.2.3 (page 3532 line 119487) "Attempting to infer the quality of an implementation based on whether it detects optional error conditions is not useful." ... "Some implementations cannot reliably detect an invalid address." Furthermore, per XSH 2.1.1 (page 471 line 15965), "If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or a null pointer), the behavior is undefined." We cannot specify EFAULT as a behavior of something that is already declared as undefined behavior, although an implementation is free to add this as a quality of implementation extension.

Therefore, we are rejecting this request.

Issue History

Date Modified Username Field Change
2013-07-20 01:19 Steve_Bartolomei New Issue
2013-07-20 01:19 Steve_Bartolomei Status New => Under Review
2013-07-20 01:19 Steve_Bartolomei Assigned To => ajosey
2013-07-20 01:19 Steve_Bartolomei Name => Steve Bartolomei
2013-07-20 01:19 Steve_Bartolomei Organization => LynuxWorks, Inc.
2013-07-20 01:19 Steve_Bartolomei Section => pthread_setcancelstate, pthread_setcanceltype
2013-07-20 01:19 Steve_Bartolomei Page Number => (page or range of pages)
2013-07-20 01:19 Steve_Bartolomei Line Number => (Line or range of lines)
2013-07-20 02:02 eblake Note Added: 0001690
2013-08-01 15:51 eblake Note Added: 0001693
2013-08-01 15:53 eblake Page Number (page or range of pages) => 1709
2013-08-01 15:53 eblake Line Number (Line or range of lines) => 55195
2013-08-01 15:53 eblake Interp Status => ---
2013-08-01 15:53 eblake Status Under Review => Closed
2013-08-01 15:53 eblake Resolution Open => Rejected
2013-08-01 15:55 eblake Note Edited: 0001693
2013-08-01 15:56 eblake Note Edited: 0001693