Fix MicroLock data storage when it is not word/half-word aligned
Summary: The current data storage API code assumes that the MicroLock is 4-byte aligned and that the lock lives in the lowest byte of `word()`. This assumption is incorrect (see added test). We should instead rely on `baseShift()`. This API is only used for `folly::compact_once_flag` which is new so low chance something broke. Reviewed By: andriigrynenko, davidtgoldblatt Differential Revision: D26091484 fbshipit-source-id: c6e6e9aa7a963cada16e0ef7783fcc6bf6d2aed6
Showing
Please register or sign in to comment