| Summary: | memset_s() and abort_handler_s() missed some standard notes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Yuri Pankov <yuripv> | ||||
| Component: | bin | Assignee: | freebsd-standards (Nobody) <standards> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | cem, emaste, kib | ||||
| Priority: | --- | Keywords: | patch | ||||
| Version: | CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Could you put the patch at reviews.freebsd.org, please ? I have several questions and small notes that I want to discuss before committing the change. Committed in r322427 |
Created attachment 185140 [details] patch to correct the mentioned issues, updating the memset_s test case as well abort_handler_s() currently simply calls abort(), though the documentation says it needs to do more work - "Writes an implementation-defined message to stderr which must include the string pointed to by msg and calls abort()." memset_s() is missing the fact that it should treat "n > smax" condition as error, and invoke the constraint handler after filling the buffer - "following errors are detected at runtime and call the currently installed constraint handler function after storing ch in every location of the destination range [dest, dest+destsz) if dest and destsz are themselves valid", one of the errors is "n > smax" itself.