src: temporary fix for AIX malloc issue
Checklist
-
make -j4 test
(UNIX) orvcbuild test nosign
(Windows) passes -
the commit message follows commit guidelines
Affected core subsystem(s)
src
Description of change
With the introduction of the v8 inspector the following tests started to fail on AIX: test-async-wrap-post-did-throw test-async-wrap-throw-from-callback test-crypto-random
The reason for the failures was a malloc(0)
issue. On GNU compatible
malloc
a malloc(0)
returns a vaild pointer, but on AIX it returns
a null pointer which is considered to be a failure in node.
In order to get a GNU compatible malloc
AIX requires the following
flags to be defined:
_LINUX_SOURCE_COMPAT
_ALL_SOURCE
However regardless of these flags, the STL headers undefine malloc
and replace it with a non GNU compatible malloc
. This is a temporary
workaround until the AIX team for gcc release an update that fixes this
behaviour.
For more information (and also fixes): https://github.com/nodejs/node/issues/7080
AIX CI run: https://ci.nodejs.org/job/node-test-commit-aix/210/