Page MenuHomeFreeBSD

libthr: Fix LIBPTHREAD_QUEUE_FIFO range
Needs ReviewPublic

Authored by aokblast on Thu, Oct 8, 6:54 PM.
Tags
None
Referenced Files
F175253526: D60487.id189087.diff
Fri, Oct 9, 11:13 AM
F175214396: D60487.diff
Fri, Oct 9, 4:06 AM
F175206111: D60487.id189087.diff
Fri, Oct 9, 2:30 AM
F175196194: D60487.id189087.diff
Fri, Oct 9, 12:44 AM
F175196121: D60487.diff
Fri, Oct 9, 12:44 AM
Subscribers

Details

Reviewers
kib
markj
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 77871
Build 74754: 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?