Page MenuHomeFreeBSD

libthr: Fix LIBPTHREAD_QUEUE_FIFO range
ClosedPublic

Authored by aokblast on Thu, Oct 8, 6:54 PM.
Tags
None
Referenced Files
F176485572: D60487.diff
Mon, Oct 19, 6:03 AM
F176467010: D60487.id189087.diff
Mon, Oct 19, 2:23 AM
Unknown Object (File)
Sun, Oct 18, 12:50 AM
Unknown Object (File)
Thu, Oct 15, 10:16 AM
Unknown Object (File)
Thu, Oct 15, 9:10 AM
Unknown Object (File)
Thu, Oct 15, 1:50 AM
Unknown Object (File)
Thu, Oct 15, 1:48 AM
Unknown Object (File)
Thu, Oct 15, 12:20 AM
Subscribers

Details

Summary

LIBPTHREAD_QUEUE_FIFO is used in bitwise offset, we set the limit to
0~31 so that it won't cause undefined behavior. Also, create a new help
function to do getnv+strtol directly and check the boundary of the valid
value.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 77930
Build 74813: arc lint + arc unit

Event Timeline

In the summary:

Also, create a new helpER
function to do getEnv+strtol directly
lib/libthr/thread/thr_init.c
489
490

Why do we need to preserve errno?

lib/libthr/thread/thr_init.c
490

strtol override errno. But maybe it is not important. Drop this now.

Please fix typos in the commit message.

This revision is now accepted and ready to land.Fri, Oct 9, 10:34 PM
This revision was automatically updated to reflect the committed changes.