]> granicus.if.org Git - gc/commit
Ensure oom_fn callback executed on out-of-memory in calloc
authorIvan Maidanski <ivmai@mail.ru>
Fri, 18 Nov 2016 14:16:32 +0000 (17:16 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 27 Nov 2016 06:37:09 +0000 (09:37 +0300)
commit80f428f3980e6b819987e0293b3420ac5c1b2959
treee03789e75f86e6baad5899089511b5fee605a70f
parentaed7ec54e287ddbbd13a743927b61368eb617770
Ensure oom_fn callback executed on out-of-memory in calloc
(fix commits e10c1eb4e1a6f9)

* malloc.c [REDIRECT_MALLOC && !REDIRECT_MALLOC_IN_HEADER] (calloc):
Call oom_fn(SIZE_MAX) (instead of returning NULL) if n*lb overflows.
* typd_mlc.c (GC_calloc_explicitly_typed): Likewise.
* typd_mlc.c (GC_calloc_explicitly_typed): If register_disappearing_link
failed due to lack of memory then call oom_fn(lb) instead of
GC_malloc(lb); update comment.
malloc.c
typd_mlc.c