Project

General

Profile

Bug #7236

libumem should be able to abort() when an allocation fails

Added by Daniel Kimmel almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-07-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

When libumem isn't able to satisfy an allocation request, it can be hard to debug why that was true unless you manage to get a core dump or other debug information from that exact instant so you can analyze the contents of the heap. This adds that feature to libumem through a new UMEM_DEBUG environment variable argument called "checknull". The behavior is:

- if the libumem implementation of malloc() would return null and the "noabort" UMEM_DEBUG argument is not given, abort the process
- if the same is true but "noabort" is given, log the error such that mdb can read it with ::umem_status, but don't abort the process

History

#1

Updated by Electric Monk almost 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 831abf2c3ce98eddc86402eb1c97c92fa48c7349

commit  831abf2c3ce98eddc86402eb1c97c92fa48c7349
Author: Dan Kimmel <dan.kimmel@delphix.com>
Date:   2016-08-19T22:01:59.000Z

    7236 libumem should be able to abort() when an allocation fails
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Basil Crow <basil.crow@delphix.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF