<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - malloc and posix_memalign used without including cstdlib"
href="https://bugs.webkit.org/show_bug.cgi?id=167800">167800</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>malloc and posix_memalign used without including cstdlib
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Local Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>bmalloc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lantw44@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>ggaren@apple.com
</td>
</tr></table>
<p>
<div>
<pre>This causes compilation error on FreeBSD:
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:78:20: error: no member named 'malloc' in the global namespace; did you mean simply 'malloc'?
void* result = ::malloc(size);
^~~~~~~~
malloc
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:76:18: note: 'malloc' declared here
void* DebugHeap::malloc(size_t size)
^
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:87:9: error: use of undeclared identifier 'posix_memalign'
if (posix_memalign(&result, alignment, size)) {
^
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:97:20: error: no member named 'realloc' in the global namespace; did you mean simply 'realloc'?
void* result = ::realloc(object, size);
^~~~~~~~~
realloc
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:95:18: note: 'realloc' declared here
void* DebugHeap::realloc(void* object, size_t size)
^
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:105:7: error: no type named 'free' in the global namespace
::free(object);
~~^
/path/to/WebKit/Source/bmalloc/bmalloc/DebugHeap.cpp:103:28: warning: unused parameter 'object' [-Wunused-parameter]
void DebugHeap::free(void* object)
^
1 warning and 4 errors generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>