Austin Group Bug Tracker
2014-08-26 16:51:43 UTC
The following issue has been SUBMITTED.
======================================================================
http://austingroupbugs.net/view.php?id=871
======================================================================
Reported By: shware_systems
Assigned To:
======================================================================
Project: 1003.1(2013)/Issue7+TC1
Issue ID: 871
Category: System Interfaces
Type: Omission
Severity: Comment
Priority: normal
Status: New
Name: Mark Ziegast
Organization: SHware Systems Development
User Reference:
Section: sem_getvalue, sem_post, sem_*wait
Page Number: many
Line Number: 58951, 59170, others
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2014-08-26 16:51 UTC
Last Modified: 2014-08-26 16:51 UTC
======================================================================
Summary: Missing potential error code, EOVERFLOW
Description:
In looking over reports 869, 870 I noticed that the sem_post() interface
requires an int value be incremented, but does not provide an application a
means of detecting arithmetic overflow of that value, when the SIGFPE
signal is blocked, in a way distinguishable from an attempt to use an
uninitialized sem_t record, currently reported by the EINVAL error code.
While this may be a corner case usually encountered only when an
application has an infinite loop containing a sem_post() call, not
detecting it may cause threads to spuriously unblock, by increment to 0, or
sem_getvalue to return an invalid waiting processes count.
Whether this should be a sticky case, requiring the semaphore be
reinitialized before other access attempts succeed, or what other side
effects should be required behavior I feel needs discussion, so Desired
Action sparse.
Desired Action:
Add to the Error Codes section of the related interfaces:
[EOVERFLOW] The semaphore count was incremented past INT_MAX,
invalidating the semaphore usage.
Additional language about usage caveats, historical practice, signal
interactions, etc.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-08-26 16:51 shware_systems New Issue
2014-08-26 16:51 shware_systems Name => Mark Ziegast
2014-08-26 16:51 shware_systems Organization => SHware Systems
Development
2014-08-26 16:51 shware_systems Section => sem_getvalue,
sem_post, sem_*wait
2014-08-26 16:51 shware_systems Page Number => many
2014-08-26 16:51 shware_systems Line Number => 58951, 59170,
others
======================================================================
======================================================================
http://austingroupbugs.net/view.php?id=871
======================================================================
Reported By: shware_systems
Assigned To:
======================================================================
Project: 1003.1(2013)/Issue7+TC1
Issue ID: 871
Category: System Interfaces
Type: Omission
Severity: Comment
Priority: normal
Status: New
Name: Mark Ziegast
Organization: SHware Systems Development
User Reference:
Section: sem_getvalue, sem_post, sem_*wait
Page Number: many
Line Number: 58951, 59170, others
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2014-08-26 16:51 UTC
Last Modified: 2014-08-26 16:51 UTC
======================================================================
Summary: Missing potential error code, EOVERFLOW
Description:
In looking over reports 869, 870 I noticed that the sem_post() interface
requires an int value be incremented, but does not provide an application a
means of detecting arithmetic overflow of that value, when the SIGFPE
signal is blocked, in a way distinguishable from an attempt to use an
uninitialized sem_t record, currently reported by the EINVAL error code.
While this may be a corner case usually encountered only when an
application has an infinite loop containing a sem_post() call, not
detecting it may cause threads to spuriously unblock, by increment to 0, or
sem_getvalue to return an invalid waiting processes count.
Whether this should be a sticky case, requiring the semaphore be
reinitialized before other access attempts succeed, or what other side
effects should be required behavior I feel needs discussion, so Desired
Action sparse.
Desired Action:
Add to the Error Codes section of the related interfaces:
[EOVERFLOW] The semaphore count was incremented past INT_MAX,
invalidating the semaphore usage.
Additional language about usage caveats, historical practice, signal
interactions, etc.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-08-26 16:51 shware_systems New Issue
2014-08-26 16:51 shware_systems Name => Mark Ziegast
2014-08-26 16:51 shware_systems Organization => SHware Systems
Development
2014-08-26 16:51 shware_systems Section => sem_getvalue,
sem_post, sem_*wait
2014-08-26 16:51 shware_systems Page Number => many
2014-08-26 16:51 shware_systems Line Number => 58951, 59170,
others
======================================================================