[Webkit-unassigned] [Bug 167800] New: malloc and posix_memalign used without including cstdlib

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 3 10:15:59 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167800

            Bug ID: 167800
           Summary: malloc and posix_memalign used without including
                    cstdlib
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: bmalloc
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lantw44 at gmail.com
                CC: ggaren at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170203/3d730c39/attachment.html>


More information about the webkit-unassigned mailing list