Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6dfe7ae

Browse filesBrowse files
gireeshpunathilMyles Borins
authored andcommitted
cares: Support malloc(0) scenarios for AIX
Many places in cares library, when the stream data arrives from the network with respect to dns and reverse dns resolution, they are populated into data structures created dymaically based on the size of the data. Malloc is heavily used for such cases. Often, based on the data length, malloc(0) is invoked. Linux behavior on zero byte allocation is to return a valid pointer where in AIX, it always return NULL. This manifestst as test failure of test/internet/test-dns.js Solution is to build cares with Linux compatible malloc behavior PR-URL: #6305 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 87cdb83 commit 6dfe7ae
Copy full SHA for 6dfe7ae

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎deps/cares/cares.gyp‎

Copy file name to clipboardExpand all lines: deps/cares/cares.gyp
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
[ 'OS=="aix"', {
1313
'include_dirs': [ 'config/aix' ],
1414
'sources': [ 'config/aix/ares_config.h' ],
15+
'defines': [
16+
# Support for malloc(0)
17+
'_LINUX_SOURCE_COMPAT=1',
18+
'_ALL_SOURCE=1'],
1519
}],
1620
['OS=="solaris"', {
1721
'defines': [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.