[Tarantool-patches] [PATCH v7 2/5] box/applier: add missing diag_set on region_alloc failure

Cyrill Gorcunov gorcunov at gmail.com
Wed Feb 5 13:06:20 MSK 2020


On Wed, Feb 05, 2020 at 12:49:46PM +0300, Konstantin Osipov wrote:
> > 
> > IOW I think we should handle NULLs to be stable in long terms.
> 
> While I sort of agree with the discipline of checking the malloc
> return value, just as a style habit, you won't get NULL
> from malloc() in practice. OOM killer will do its job first. 
> 
> Also if you do, you're just as good crashing next line, when
> accessing null pointer. 

Actually I've seen some ticket in our github about wrapping
malloc with xmalloc which would crash on malloc failure.
IOW, lets leave explisit check for now.


More information about the Tarantool-patches mailing list