mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-03 19:30:07 +02:00
Bug 724590 - GSlice slab_stack corruption
Dereference allocation->contention_counters before trying to take the address of an element.
This commit is contained in:
parent
9f0ad54c80
commit
c49ec3c8d7
@ -715,7 +715,8 @@ static ChunkLink*
|
|||||||
magazine_cache_pop_magazine (guint ix,
|
magazine_cache_pop_magazine (guint ix,
|
||||||
gsize *countp)
|
gsize *countp)
|
||||||
{
|
{
|
||||||
g_mutex_lock_a (&allocator->magazine_mutex, &allocator->contention_counters[ix]);
|
guint *counters = allocator->contention_counters;
|
||||||
|
g_mutex_lock_a (&allocator->magazine_mutex, &counters[ix]);
|
||||||
if (!allocator->magazines[ix])
|
if (!allocator->magazines[ix])
|
||||||
{
|
{
|
||||||
guint magazine_threshold = allocator_get_magazine_threshold (allocator, ix);
|
guint magazine_threshold = allocator_get_magazine_threshold (allocator, ix);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user