[Webkit-unassigned] [Bug 69942] When an API test fails, TestWebKitAPI crashes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 20 11:01:58 PST 2011


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





--- Comment #7 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2011-12-20 11:01:58 PST ---
When compiling TestWebKitAPI with "-g -O0" (pardon the hack):

--- a/Tools/TestWebKitAPI/Configurations/Base.xcconfig
+++ b/Tools/TestWebKitAPI/Configurations/Base.xcconfig
@@ -38,1 +38,1 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES
-WARNING_CFLAGS = -Wall -W -Wno-unused-parameter
+WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -g -O0

I see this crash when trying to run ./Tools/Scripts/run-api-tests while it's generating a list of tests:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore          0x0000000104c99f69 WTF::fastFree(void*) + 137 (TCPageMap.h:234)
1   TestWebKitAPI                     0x0000000104290705 testing::internal::String::~String() + 21 (gtest-string.h:218)
2   libsystem_c.dylib                 0x00007fff8fe387c8 __cxa_finalize + 274
3   libsystem_c.dylib                 0x00007fff8fe38652 exit + 18
4   TestWebKitAPI                     0x000000010428e77b start + 59

This indicates (to me) that gtest is trying to use FastMalloc for its destructors.  If gtest is using malloc to allocate this memory, it's not surprising that FastMalloc is crashing when it tries to release memory it's not managing.

Since JavaScriptCore, et al, are compiled with FastMalloc on release builds, I don't think that it would work to enable USE_SYSTEM_MALLOC to compile TestWebKitAPI (as Filip notes in Comment #4).

We may need to compile gtest using FastMalloc to make TestWebKitAPI not crash.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list