diff options
author | Maxim Kuvyrkov <maxim@kugelworks.com> | 2013-12-24 09:44:50 +1300 |
---|---|---|
committer | Maxim Kuvyrkov <maxim@kugelworks.com> | 2013-12-24 09:44:50 +1300 |
commit | 362b47fe09ca9a928d444c7e2f7992f7f61bfc3e (patch) | |
tree | 6279f6a26cf21a076aeee89081d4cc350ed8dc74 /test-skeleton.c | |
parent | b9bcbbcbe7afa94442d335811d4a1c1e0c0a1daf (diff) | |
download | glibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.zip glibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.tar.gz glibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.tar.bz2 |
Fix race in free() of fastbin chunk: BZ #15073
Perform sanity check only if we have_lock. Due to lockless nature of fastbins
we need to be careful derefencing pointers to fastbin entries (chunksize(old)
in this case) in multithreaded environments.
The fix is to add have_lock to the if-condition checks. The rest of the patch
only makes code more readable.
* malloc/malloc.c (_int_free): Perform sanity check only if we
have_lock.
Diffstat (limited to 'test-skeleton.c')
0 files changed, 0 insertions, 0 deletions