RESOLVED FIXED Bug 82652
TestWebKitAPI always crashes in release builds
https://bugs.webkit.org/show_bug.cgi?id=82652
Summary TestWebKitAPI always crashes in release builds
Simon Fraser (smfr)
Reported 2012-03-29 13:43:00 PDT
This log shows: ** BUILD SUCCEEDED ** TestWebKitAPI(76672) malloc: *** error for object 0x104fd2620: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Failed to build list of tests! program finished with exit code 0 and there's an associated crash log: s-bot-135:CrashReporter buildbot$ cat TestWebKitAPI_2012-03-29-120650_buildbots-Mac-Pro-49.crash Process: TestWebKitAPI [71902] Path: /Volumes/VOLUME/*/TestWebKitAPI Identifier: TestWebKitAPI Version: ??? (???) Code Type: X86-64 (Native) Parent Process: perl5.12 [71610] Date/Time: 2012-03-29 12:06:48.588 -0700 OS Version: Mac OS X 10.7.3 (11D50) Report Version: 9 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: /Volumes/Data/slave/lion-intel-release-tests-wk2/build/WebKitBuild/Release/TestWebKitAPI objc[71902]: garbage collection is OFF *** error for object 0x109f0c620: pointer being freed was not allocated Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff96e2782a __kill + 10 1 libsystem_c.dylib 0x00007fff8f2a8a9c abort + 177 2 libsystem_c.dylib 0x00007fff8f30784c free + 389 3 TestWebKitAPI 0x0000000106f99219 testing::internal::StrStreamToString(testing::internal::StrStream*) + 274 4 TestWebKitAPI 0x0000000106fa3174 _ZN7testing8internalL12FlagToEnvVarEPKc + 114 5 TestWebKitAPI 0x0000000106f93ca4 testing::internal::BoolFromGTestEnv(char const*, bool) + 26 6 TestWebKitAPI 0x0000000106fabc69 _GLOBAL__I_a + 25 7 dyld 0x00007fff66b45da6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 218 8 dyld 0x00007fff66b45af2 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46 9 dyld 0x00007fff66b432e4 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 260 10 dyld 0x00007fff66b440b7 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 59 11 dyld 0x00007fff66b394dd dyld::initializeMainExecutable() + 206 12 dyld 0x00007fff66b3d60b dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**) + 1852 13 dyld 0x00007fff66b37059 _dyld_start + 49 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x00007fff66b34370 rcx: 0x00007fff66b34358 rdx: 0x0000000000000000 rdi: 0x00000000000118de rsi: 0x0000000000000006 rbp: 0x00007fff66b34380 rsp: 0x00007fff66b34358 r8: 0x0000000000000000 r9: 0x00007fff8f31a230 r10: 0x00007fff96e28e62 r11: 0xffffff80002d8220 r12: 0x000000010708d000 r13: 0x0000000000000003 r14: 0x000000010708e000 r15: 0x0000000000000003 rip: 0x00007fff96e2782a rfl: 0x0000000000000206 cr2: 0x000000010708e000 Logical CPU: 0
Attachments
Radar WebKit Bug Importer
Comment 1 2012-03-29 14:19:19 PDT
Simon Fraser (smfr)
Comment 2 2012-03-29 14:35:54 PDT
Fixing the script error detection via bug 82659.
Stephanie Lewis
Comment 3 2012-03-29 17:25:04 PDT
Turns out this is the same crashing issue as <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142. gtest uses a std::stringstream which at some point call stringstream::str() which allocates a new string with fastMalloc and deallocates with system free. Unfortunately, making gtest not using the c std library is not a useful option. I am curious why gtest needs to include fastMalloc and wtf stuff to start with. If we could remove any internal headers from gtest and TestWebKitAPI we should be able to fix the bug that way. Another temporary fix would be to go back to the GNU std library.
Stephanie Lewis
Comment 4 2012-03-29 17:42:01 PDT
FastMalloc was added to gtest in http://trac.webkit.org/changeset/104091 because of crashes using fastFree. < http://webkit.org/b/66521> < rdar://problem/10607911>
Csaba Osztrogonác
Comment 5 2015-02-17 07:02:07 PST
Release bots now run API tests without any problem, see bug141518 for details.
Note You need to log in before you can comment on or make changes to this bug.