Out of memory condition in OS causes AV [CORE1983] #2421
Labels
affect-version: 2.0.0
affect-version: 2.0.1
affect-version: 2.0.2
affect-version: 2.0.3
affect-version: 2.0.4
affect-version: 2.1 Alpha 1
affect-version: 2.1 Beta 1
affect-version: 2.1 Beta 2
affect-version: 2.1 RC1
affect-version: 2.1 RC2
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.5 Alpha 1
affect-version: 2.5 Initial
component: engine
fix-version: 2.0.5
fix-version: 2.1.2
fix-version: 2.5 Beta 1
priority: major
qa: cannot be tested
type: bug
Submitted by: @AlexPeshkoff
mmap() call returns MAP_FAILED (-1) in case of any error, including out of memory condition.
In alloc.cpp:external_alloc() value, returned by MMAP, is returned directly (except Solaris), no matter of the fact that caller expects NULL in case of allocation error, not -1. Therefore (void*)(-1) is used as a normally allocated memory block, definitely causing segfault at the moment of first use.
Commits: 3f3a206 d6d7df3 4d2e830
The text was updated successfully, but these errors were encountered: