Fix UB from signed integer overflow in RWSpinLock
authorMarcus Holland-Moritz <mhx@fb.com>
Wed, 13 Sep 2017 08:39:44 +0000 (01:39 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 13 Sep 2017 08:50:13 +0000 (01:50 -0700)
commit7a3f4d065e50a3b1e8f63e0701e7bffd31b42417
treef1196121f4546ad7dfbc94aea88b5a6b2cae9cc4
parent1c6da6e3d2f375d0e9ef063bd9c5ffcb0d07015d
Fix UB from signed integer overflow in RWSpinLock

Summary:
The signed counters used in a couple of places can in theory (and practice)
overflow, yielding UB. Use unsigned counters instead.

Reviewed By: luciang, philippv

Differential Revision: D5818606

fbshipit-source-id: c5928b779e76b309b00b7f6308a220e2bf6cbf79
folly/RWSpinLock.h