Bug 82381 - webkit_unit_tests crashing on chromium lion in ScrollbarLayerChromiumTest.resolveScrollLayerPointer
Summary: webkit_unit_tests crashing on chromium lion in ScrollbarLayerChromiumTest.res...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 14:42 PDT by Dirk Pranke
Modified: 2012-03-27 18:56 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.84 KB, patch)
2012-03-27 17:59 PDT, James Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2012-03-27 14:42:39 PDT
see, e.g. http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.7/builds/2920/steps/webkit_unit_tests/logs/stdio

stack trace from my lion debug build:

src $ out/Debug/webkit_unit_tests --gtest_filter=ScrollbarLayerChromiumTest.\*
Note: Google Test filter = ScrollbarLayerChromiumTest.*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ScrollbarLayerChromiumTest
[ RUN      ] ScrollbarLayerChromiumTest.resolveScrollLayerPointer
[18450:-1402342720:0327/144021:593795945424974:ERROR:process_util_posix.cc(142)] Received signal 10
	0   webkit_unit_tests                   0x01c13fef base::debug::StackTrace::StackTrace() + 63
	1   webkit_unit_tests                   0x01c13f8b base::debug::StackTrace::StackTrace() + 43
	2   webkit_unit_tests                   0x01cc2967 base::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, __darwin_ucontext*) + 295
	3   libsystem_c.dylib                   0x958b259b _sigtramp + 43
	4   ???                                 0xffffffff 0x0 + 4294967295
	5   webkit_unit_tests                   0x026d079f WebCore::Scrollbar::scrollbarOverlayStyle() const + 79
	6   webkit_unit_tests                   0x026d07ec non-virtual thunk to WebCore::Scrollbar::scrollbarOverlayStyle() const + 28
	7   webkit_unit_tests                   0x0299d007 WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle(WebCore::ScrollbarThemeClient*) + 71
	8   webkit_unit_tests                   0x0299c6e7 WebCore::ScrollbarThemeMac::registerScrollbar(WebCore::ScrollbarThemeClient*) + 327
	9   webkit_unit_tests                   0x026d0390 WebCore::Scrollbar::Scrollbar(WebCore::ScrollableArea*, WebCore::ScrollbarOrientation, WebCore::ScrollbarControlSize, WebCore::ScrollbarTheme*) + 368
	10  webkit_unit_tests                   0x005f26ba (anonymous namespace)::MockScrollbar::MockScrollbar() + 90
	11  webkit_unit_tests                   0x005f243b (anonymous namespace)::MockScrollbar::MockScrollbar() + 43
	12  webkit_unit_tests                   0x005f1ad9 (anonymous namespace)::ScrollbarLayerChromiumTest_resolveScrollLayerPointer_Test::TestBody() + 89
	13  webkit_unit_tests                   0x00ae60d1 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 145
	14  webkit_unit_tests                   0x00ad4aee void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 126
	15  webkit_unit_tests                   0x00ac7eee testing::Test::Run() + 254
	16  webkit_unit_tests                   0x00ac89a7 testing::TestInfo::Run() + 263
	17  webkit_unit_tests                   0x00ac9219 testing::TestCase::Run() + 265
	18  webkit_unit_tests                   0x00ace73d testing::internal::UnitTestImpl::RunAllTests() + 797
	19  webkit_unit_tests                   0x00ae0a11 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 145
	20  webkit_unit_tests                   0x00ad771e bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 126
	21  webkit_unit_tests                   0x00ace3e4 testing::UnitTest::Run() + 148
	22  webkit_unit_tests                   0x035edfb0 base::TestSuite::Run() + 256
	23  webkit_unit_tests                   0x000e0839 main + 105
	24  webkit_unit_tests                   0x000e0785 start + 53
ax: ac6a2a10, bx: 6a681501, cx: 0, dx: 9cc95b61
di: 299c5a0, si: c00dcff0, bp: c00dcfa8, sp: c00dcf90, ss: 23, flags: 10286
ip: 26d2ff6, cs: 1b, ds: 23, es: 23, fs: 0, gs: f
src $
Comment 1 James Robinson 2012-03-27 16:30:01 PDT
The stack doesn't make complete sense to me yet, but the bug is that we're calling in to ScrollbarThemeMac's scrollbar registration during this test which tries to access something and then explodes (possibly the Scrollbar's m_scrollableArea, which we have set to NULL?).  It's very dodgy to be calling a virtual function during a classes constructor.

This only blows up on Lion since that's the only platform where we have overlay scrollbars on by default.
Comment 2 James Robinson 2012-03-27 16:32:32 PDT
We actually should probably just enable the mock scrollbar theme for this unit test. I'll try to repro locally and try this out.
Comment 3 James Robinson 2012-03-27 17:59:25 PDT
Created attachment 134186 [details]
Patch
Comment 4 Adrienne Walker 2012-03-27 18:12:59 PDT
Comment on attachment 134186 [details]
Patch

Oh, nice thought to use the mock scrollbars in the unit test.  R=me.
Comment 5 WebKit Review Bot 2012-03-27 18:56:46 PDT
Comment on attachment 134186 [details]
Patch

Clearing flags on attachment: 134186

Committed r112351: <http://trac.webkit.org/changeset/112351>
Comment 6 WebKit Review Bot 2012-03-27 18:56:51 PDT
All reviewed patches have been landed.  Closing bug.