site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcibAAjMR6GMXAbzEd2qDwAdT0T19A== Thread-topic: failmalloc equivalent for MacOS X User-agent: Microsoft-Entourage/11.4.0.080122 I noticed the message below from David, and it occurred to me that this might be something to build into libgmalloc. I looked around on Apple's site for the sources, and then out on the web in general, but I didn't find them; are they Apple proprietary, or am I just blind? Thanks, Cem Karan ------------------------------ Message: 4 Date: Thu, 20 Mar 2008 14:11:04 +0100 From: David Geldreich <david.geldreich@free.fr> Subject: failmalloc equivalent for MacOS X To: darwin-dev@lists.apple.com Message-ID: <D8356345-8B1C-4520-9DBD-8779C7DDF56D@free.fr> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi everyone, I am trying to test a program against malloc/new failure. I was wondering if an equivalent of failmalloc (http://www.nongnu.org/ failmalloc/) exists for OSX ? failmalloc is dependent on glibc memory allocation scheme, so does not work on OSX. If not, I will write one such library. I am wondering if it is OK to introspect libgmalloc for finding all the malloc related functions that are rerouted for testing ? I need to override less functions (only the one that allocates memory and could fail) but I think libgmalloc have an exhaustive list of entry points. ab5fa114 s __interpose_NXAddRegion ab5fa1fc s __interpose_NXCreateChildZone ab5fa204 s __interpose_NXCreateZone ab5fa20c s __interpose_NXDefaultMallocZone ab5fa214 s __interpose_NXDestroyZone ab5fa1cc s __interpose_NXMallocCheck ab5fa1f4 s __interpose_NXMergeZone ab5fa1c4 s __interpose_NXNameZone ab5fa1d4 s __interpose_NXProtectZone ab5fa1bc s __interpose_NXRemoveRegion ab5fa1ec s __interpose_NXZoneCalloc ab5fa21c s __interpose_NXZoneFree ab5fa1e4 s __interpose_NXZoneFromPtr ab5fa224 s __interpose_NXZoneMalloc ab5fa1dc s __interpose_NXZonePtrInfo ab5fa22c s __interpose_NXZoneRealloc ab5fa1b4 s __interpose__NXMallocDumpFrees ab5fa1ac s __interpose__NXMallocDumpZones ab5fa184 s __interpose__malloc_fork_child ab5fa18c s __interpose__malloc_fork_parent ab5fa194 s __interpose__malloc_fork_prepare ab5fa144 s __interpose_calloc ab5fa154 s __interpose_free ab5fa15c s __interpose_malloc ab5fa10c s __interpose_malloc_create_zone ab5fa174 s __interpose_malloc_debug ab5fa104 s __interpose_malloc_default_zone ab5fa0fc s __interpose_malloc_destroy_zone ab5fa12c s __interpose_malloc_error ab5fa16c s __interpose_malloc_freezedry ab5fa0f4 s __interpose_malloc_get_all_zones ab5fa0ec s __interpose_malloc_get_zone_name ab5fa134 s __interpose_malloc_good_size ab5fa164 s __interpose_malloc_jumpstart ab5fa234 s __interpose_malloc_printf ab5fa0e4 s __interpose_malloc_set_zone_name ab5fa19c s __interpose_malloc_singlethreaded ab5fa13c s __interpose_malloc_size ab5fa0dc s __interpose_malloc_zone_calloc ab5fa0d4 s __interpose_malloc_zone_check ab5fa0cc s __interpose_malloc_zone_free ab5fa0c4 s __interpose_malloc_zone_from_ptr ab5fa0bc s __interpose_malloc_zone_log ab5fa0b4 s __interpose_malloc_zone_malloc ab5fa0ac s __interpose_malloc_zone_print ab5fa0a4 s __interpose_malloc_zone_print_ptr_info ab5fa09c s __interpose_malloc_zone_realloc ab5fa094 s __interpose_malloc_zone_register ab5fa08c s __interpose_malloc_zone_unregister ab5fa124 s __interpose_malloc_zone_valloc ab5fa14c s __interpose_realloc ab5fa1a4 s __interpose_set_malloc_singlethreaded ab5fa11c s __interpose_valloc ab5fa17c s __interpose_vfree Thanks in advance. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com