Skip to content
  • Mike Hommey's avatar
    Bug 1396361 - Avoid crashing when some system library calls malloc_zone_free(zone, NULL). r=njn · acb85e2b
    Mike Hommey authored
    Some system libraries call malloc_zone_free directly instead of free,
    and sometimes they do that with the wrong zone. When that happens, we
    circle back, trying to find the right zone, and call malloc_zone_free
    with the right one, but when we can't find one, we crash, which matches
    what the system free() would do. Except in one case where the pointer
    we're being passed is NULL, in which case we can't trace it back to any
    zone, but shouldn't crash (system free() explicitly doesn't crash in
    that case).
    
    --HG--
    extra : rebase_source : 17efdcd80f1a53be7ab6b7293bfb6060a9aa4a48
    acb85e2b