Changeset 228 for trunk


Ignore:
Timestamp:
Apr 22, 2009, 5:32:03 PM (15 years ago)
Author:
katerina
Message:

Fix yet another NULL dereference segfault in dnmalloc on 64bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dnmalloc.c

    r187 r228  
    9292   Fail    on: OpenBSD/pthread (in  _thread_machdep_save_float_state),
    9393               might be related to OpenBSD pthread internals (??).
    94                Non-treaded version (#undef USE_MALLOC_LOC)
     94               Non-treaded version (#undef USE_MALLOC_LOCK)
    9595               works on OpenBSD.
    9696   
     
    101101   Minor cleanups
    102102   Fix: eliminate prototypes for memset, memcpy (they're in string.h)
     103   Fix: one more malloc_consolidate segfault
    103104
    104105   There may be some bugs left in this version. please use with caution.
     
    44064407          /* consolidate forward */
    44074408          if (!inuse(nextchunk)) {
    4408             unlink(nextchunk, bck, fwd);
    4409             size += nextsize;
    4410             set_head(p, size | PREV_INUSE);
    4411             hashtable_skiprm(p, nextchunk);
    4412             freecilst_add (nextchunk);
     4409            /* if mmap is used instead of sbrk, we may have a
     4410             * chunk with !nextchunk->fd && !nextchunk->bk
     4411             */
     4412            if (nextchunk->fd && nextchunk->fd)
     4413              {
     4414                unlink(nextchunk, bck, fwd);
     4415                size += nextsize;
     4416                set_head(p, size | PREV_INUSE);
     4417                hashtable_skiprm(p, nextchunk);
     4418                freecilst_add (nextchunk);
     4419              }
    44134420          }
    44144421         
Note: See TracChangeset for help on using the changeset viewer.