CompileC /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o llint/LLIntOffsetsExtractor.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler cd /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/Source/JavaScriptCore /Volumes/Data/BuildSlave/build-asan-webkit/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -O0 -Wno-missing-field-initializers -Wmissing-prototypes -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DHAVE_DTRACE=1 -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -DHAVE_HEADER_DETECTION_H -DJSC_OBJC_API_AVAILABLE_MAC_OS_X_1080 -DENABLE_3D_RENDERING -DENABLE_BLOB -DENABLE_CACHE_PARTITIONING -DENABLE_CANVAS_PATH -DENABLE_CHANNEL_MESSAGING -DENABLE_CSS_BOX_DECORATION_BREAK -DENABLE_CSS_COMPOSITING -DENABLE_CSS_EXCLUSIONS -DENABLE_CSS_FILTERS -DENABLE_CSS_REGIONS -DENABLE_CSS_SHADERS -DENABLE_CSS_SHAPES -DENABLE_CSS_STICKY_POSITION -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED -DENABLE_CSS3_TEXT_DECORATION -DENABLE_CURSOR_VISIBILITY -DENABLE_DASHBOARD_SUPPORT -DENABLE_DETAILS_ELEMENT -DENABLE_DOM4_EVENTS_CONSTRUCTOR -DENABLE_ENCRYPTED_MEDIA -DENABLE_ENCRYPTED_MEDIA_V2 -DENABLE_FILTERS -DENABLE_FULLSCREEN_API -DENABLE_GEOLOCATION -DENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING -DENABLE_ICONDATABASE -DENABLE_IFRAME_SEAMLESS -DENABLE_INDEXED_DATABASE -DENABLE_INDIE_UI -DENABLE_INPUT_TYPE_COLOR -DENABLE_INPUT_TYPE_COLOR_POPOVER -DENABLE_JAVASCRIPT_DEBUGGER -DENABLE_LEGACY_CSS_VENDOR_PREFIXES -DENABLE_LEGACY_NOTIFICATIONS -DENABLE_LEGACY_VENDOR_PREFIXES -DENABLE_LEGACY_WEB_AUDIO -DENABLE_MATHML -DENABLE_MEDIA_CONTROLS_SCRIPT -DENABLE_METER_ELEMENT -DENABLE_MOUSE_CURSOR_SCALE -DENABLE_NOTIFICATIONS -DENABLE_PAGE_VISIBILITY_API -DENABLE_PDFKIT_PLUGIN -DENABLE_PROGRESS_ELEMENT -DENABLE_PROMISES -DENABLE_PUBLIC_SUFFIX_LIST -DENABLE_REQUEST_ANIMATION_FRAME -DENABLE_REMOTE_INSPECTOR -DENABLE_SHARED_WORKERS -DENABLE_SPEECH_SYNTHESIS -DENABLE_SQL_DATABASE -DENABLE_SUBTLE_CRYPTO -DENABLE_SVG -DENABLE_SVG_FONTS -DENABLE_USERSELECT_ALL -DENABLE_VIDEO -DENABLE_VIDEO_TRACK -DENABLE_WEBGL -DENABLE_WEB_ANIMATIONS -DENABLE_WEB_AUDIO -DENABLE_WEB_SOCKETS -DENABLE_WORKERS -DENABLE_XHR_TIMEOUT -DENABLE_XSLT -isysroot /Volumes/Data/BuildSlave/build-asan-webkit/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.Internal.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.9 -g -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conversion -I/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/JSCLLIntOffsetsExtractor.hmap -I/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/include -I. -Iicu -I/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include -I/Volumes/Data/BuildSlave/build-asan-webkit/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/DerivedSources/x86_64 -I/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -F/Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug -MMD -MT dependencies -MF /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.d --serialize-diagnostics /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.dia -c /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp -o /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o In file included from /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:26: In file included from /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/Source/JavaScriptCore/config.h:60: /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:266:1: error: replacement function 'operator new' cannot be declared 'inline' WTF_PRIVATE_INLINE void* operator new(size_t size) throw (std::bad_alloc) { return fastMalloc(size); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:267:1: error: replacement function 'operator new' cannot be declared 'inline' WTF_PRIVATE_INLINE void* operator new(size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:268:1: error: replacement function 'operator delete' cannot be declared 'inline' WTF_PRIVATE_INLINE void operator delete(void* p) throw() { fastFree(p); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:269:1: error: replacement function 'operator delete' cannot be declared 'inline' WTF_PRIVATE_INLINE void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:270:1: error: replacement function 'operator new[]' cannot be declared 'inline' WTF_PRIVATE_INLINE void* operator new[](size_t size) throw (std::bad_alloc) { return fastMalloc(size); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:271:1: error: replacement function 'operator new[]' cannot be declared 'inline' WTF_PRIVATE_INLINE void* operator new[](size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:272:1: error: replacement function 'operator delete[]' cannot be declared 'inline' WTF_PRIVATE_INLINE void operator delete[](void* p) throw() { fastFree(p); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:273:1: error: replacement function 'operator delete[]' cannot be declared 'inline' WTF_PRIVATE_INLINE void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); } ^ /Volumes/Data/BuildSlave/build-asan-webkit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:242:47: note: expanded from macro 'WTF_PRIVATE_INLINE' #define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline)) ^ 8 errors generated.
Yup. What we do is violating the C++ spec :(
Will these overrides still work if we declare them out-of-line? NOTE: In the short term, un-inlining these functions will cause us to crash on launch, due to bugs in other components, which are masked by our current strategy. Stephanie knows the details.
(In reply to comment #2) > Will these overrides still work if we declare them out-of-line? If we declare them out of line they will replace the global operators everywhere. > NOTE: In the short term, un-inlining these functions will cause us to crash on launch, due to bugs in other components, which are masked by our current strategy. Stephanie knows the details. I’d love to hear the details. Stephanie?
ddkilzer mentioned that this file isn't building with USE_SYSTEM_MALLOC=1. The reason for that is that this particular target doesn't build with ASAN since it's an intermediate tool for building. I'm going to try building with USE_SYSTEM_MALLOC=1 at least for all targets regardless of building with ASAN and see if I can work around this.
I’ll be able to work around this for now with https://bugs.webkit.org/show_bug.cgi?id=124362 but anything using FastMalloc will run into this problem.
I ran into this issue when building WTF with trunk clang as of 12/16/2013.
Created attachment 219547 [details] Workaround
Comment on attachment 219547 [details] Workaround As a workaround, disable the inline new, delete warnings. Ideally, we should fix our violation of the C++ standard.
For completeness, the LLVM warnings were implemented in <http://llvm.org/bugs/show_bug.cgi?id=17591>.
Created attachment 219548 [details] Workaround
Comment on attachment 219547 [details] Workaround r=me Do we need a follow-up bug to figure out what we should do instead? Do we know what we should do instead? What are the consequences of continuing to inline new/delete, even though C++ says we can't?
(In reply to comment #11) > (From update of attachment 219547 [details]) > r=me > > Do we need a follow-up bug to figure out what we should do instead? Do we know what we should do instead? > > What are the consequences of continuing to inline new/delete, even though C++ says we can't? I believe it has to do with the number of matching compiled allocation / freeing of memory with optimizations. There is an example in the bugzilla: http://llvm.org/bugs/show_bug.cgi?id=17591
(In reply to comment #11) > (From update of attachment 219547 [details]) > r=me > > Do we need a follow-up bug to figure out what we should do instead? Unless you prefer a new bug, I'll keep this bug open after I land the patch so that we can use it to follow up on this issue. Notice that I reference this bug in the FIXME comment in the patch. > Do we know what we should do instead? At this time, I don't have a good solution. From talking with Anders Carlson, one solution is to sprinkle more WTF_MAKE_FAST_ALLOCATED in the code. Alternatively, we can un-inline the operator new, delete functions assuming we resolve the issues you mentioned in your note in comment 2.
Comment on attachment 219548 [details] Workaround Attachment 219548 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/50548030
Created attachment 219553 [details] For EWS: Workaround
Committed r160838: <http://trac.webkit.org/changeset/160838>
Re-opening this bug so that we can follow up with the appropriate fix. Let me know if it's preferred to file a new bug.
Comment on attachment 219548 [details] Workaround Cleared Geoffrey Garen's review+ from obsolete attachment 219548 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Is this bug still relevant? If so, please fix the title.