Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
authorIvan Maidanski <ivmai@mail.ru>
Thu, 7 Jun 2012 18:00:37 +0000 (22:00 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 7 Jun 2012 18:00:37 +0000 (22:00 +0400)
commit0ac7a655aba6c7e1d43ad2262e4c556879e89827
treeaa5ddc0328c6dc51a2c60f3fbb75d69d1b757085
parent70d33b51b00b53fcd85c4044aa22f456dc701883
Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
(if out of memory)

* dyn_load.c (GC_register_dynamic_libraries): If GC_scratch_alloc
fails (returns null) then abort (with the appropriate message) instead
of causing SEGV.
* os_dep.c (GC_dirty_init): Likewise.
* headers.c (GC_init_headers): Report error and exit if
GC_scratch_alloc fails.
* include/private/gc_priv.h (GC_scratch_alloc): Improve comment.
* os_dep.c (GC_print_address_map): If GC_get_maps return null then
print the appropriate message (instead of passing null to GC_err_puts
thus causing SEGV).
dyn_load.c
headers.c
include/private/gc_priv.h
os_dep.c