Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix type of parameter passed by malloc_consolidate
atomic_exchange_acq() expected a pointer, but was receiving an integer.
  • Loading branch information
Tulio Magno Quites Machado Filho committed Mar 11, 2016
1 parent 869d718 commit b43f552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2016-03-11 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>

* malloc/malloc.c (malloc_consolidate): Replace 0 by NULL in
order to match the type of p when calling atomic_exchange_acq().

2016-03-11 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>

* sysdeps/powerpc/powerpc32/power4/memcmp.S (memcmp): Rearrange
Expand Down
2 changes: 1 addition & 1 deletion malloc/malloc.c
Expand Up @@ -4150,7 +4150,7 @@ static void malloc_consolidate(mstate av)
maxfb = &fastbin (av, NFASTBINS - 1);
fb = &fastbin (av, 0);
do {
p = atomic_exchange_acq (fb, 0);
p = atomic_exchange_acq (fb, NULL);
if (p != 0) {
do {
check_inuse_chunk(av, p);
Expand Down

0 comments on commit b43f552

Please sign in to comment.