WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120159
Missing null-check in HTMLFormElement::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=120159
Summary
Missing null-check in HTMLFormElement::rendererIsNeeded()
Renata Hodovan
Reported
2013-08-22 06:11:57 PDT
The following test is crashing both with release and debug build since parentRenderer is null in WebCore::HTMLFormElement::rendererIsNeeded: <html> <blockquote style="-webkit-flow-from: thread;"/> <table/> <form/> </html> Backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff439825a in WebCore::HTMLFormElement::rendererIsNeeded (this=0x8eb5b0, context=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/HTMLFormElement.cpp:106 warning: Source file is more recent than executable. 106 || (parentRenderer->isTableRow() && node->hasTagName(trTag)) (gdb) bt #0 0x00007ffff439825a in WebCore::HTMLFormElement::rendererIsNeeded (this=0x8eb5b0, context=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/HTMLFormElement.cpp:106 #1 0x00007ffff4258900 in WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer (this=0x7fffffffc790) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/NodeRenderingContext.cpp:216 #2 0x00007ffff4258b6e in WebCore::NodeRenderingContext::createRendererForElementIfNeeded (this=0x7fffffffc790) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/NodeRenderingContext.cpp:257 #3 0x00007ffff42058eb in WebCore::Element::createRendererIfNeeded (this=0x8eb5b0, context=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/Element.cpp:1390 #4 0x00007ffff420594f in WebCore::Element::attach (this=0x8eb5b0, context=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/Element.cpp:1399 #5 0x00007ffff4406792 in WebCore::executeTask (task=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLConstructionSite.cpp:103 #6 0x00007ffff4406ae3 in WebCore::HTMLConstructionSite::executeQueuedTasks (this=0x8261b8) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLConstructionSite.cpp:146 #7 0x00007ffff442fecc in WebCore::HTMLTreeBuilder::constructTree (this=0x8261a0, token=0x7fffffffc920) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:382 #8 0x00007ffff440eb06 in WebCore::HTMLDocumentParser::constructTreeFromHTMLToken (this=0x7e2db0, rawToken=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLDocumentParser.cpp:597 #9 0x00007ffff440e73b in WebCore::HTMLDocumentParser::pumpTokenizer (this=0x7e2db0, mode=WebCore::HTMLDocumentParser::AllowYield) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLDocumentParser.cpp:551 #10 0x00007ffff440df03 in WebCore::HTMLDocumentParser::pumpTokenizerIfPossible (this=0x7e2db0, mode=WebCore::HTMLDocumentParser::AllowYield) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLDocumentParser.cpp:235 #11 0x00007ffff440f0a2 in WebCore::HTMLDocumentParser::append (this=0x7e2db0, inputSource=...) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/html/parser/HTMLDocumentParser.cpp:747 #12 0x00007ffff41a1e4f in WebCore::DecodedDataDocumentParser::flush (this=0x7e2db0, writer=0x6942b0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/dom/DecodedDataDocumentParser.cpp:60 #13 0x00007ffff45a71d9 in WebCore::DocumentWriter::end (this=0x6942b0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/DocumentWriter.cpp:245 #14 0x00007ffff4599d52 in WebCore::DocumentLoader::finishedLoading (this=0x694210, finishTime=0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/DocumentLoader.cpp:402 #15 0x00007ffff4599ac0 in WebCore::DocumentLoader::notifyFinished (this=0x694210, resource=0x7dd950) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/DocumentLoader.cpp:344 #16 0x00007ffff4580db6 in WebCore::CachedResource::checkNotify (this=0x7dd950) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/cache/CachedResource.cpp:369 #17 0x00007ffff4580e8c in WebCore::CachedResource::finishLoading (this=0x7dd950) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/cache/CachedResource.cpp:385 #18 0x00007ffff457d5de in WebCore::CachedRawResource::finishLoading (this=0x7dd950, data=0x7636b0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/cache/CachedRawResource.cpp:94 #19 0x00007ffff45e3c41 in WebCore::SubresourceLoader::didFinishLoading (this=0x7c7f80, finishTime=0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/SubresourceLoader.cpp:282 #20 0x00007ffff45da52b in WebCore::ResourceLoader::didFinishLoading (this=0x7c7f80, finishTime=0) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/loader/ResourceLoader.cpp:488 #21 0x00007ffff4a85729 in WebCore::QNetworkReplyHandler::finish (this=0x7dc580) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:516 #22 0x00007ffff4a84448 in WebCore::QNetworkReplyHandlerCallQueue::flush (this=0x7dc5b8) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:250 #23 0x00007ffff4a84145 in WebCore::QNetworkReplyHandlerCallQueue::push (this=0x7dc5b8, method=(void (WebCore::QNetworkReplyHandler::*)(WebCore::QNetworkReplyHandler * const)) 0x7ffff4a8556e <WebCore::QNetworkReplyHandler::finish()>) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:216 #24 0x00007ffff4a85092 in WebCore::QNetworkReplyWrapper::didReceiveFinished (this=0x7bbc10) at /home/reni/Data/REPOS/webkit_sec/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:409 #25 0x00007ffff4a87a24 in WebCore::QNetworkReplyWrapper::qt_static_metacall (_o=0x7bbc10, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffffcf60) at .moc/release-shared/moc_QNetworkReplyHandler.cpp:176 #26 0x00007ffff220f5cb in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #27 0x00007ffff221084e in QObject::event(QEvent*) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #28 0x00007ffff3056dbc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Widgets.so.5 ---Type <return> to continue, or q <return> to quit--- #29 0x00007ffff305a075 in QApplication::notify(QObject*, QEvent*) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Widgets.so.5 #30 0x00007ffff21eadbe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #31 0x00007ffff21eca76 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #32 0x00007ffff2232333 in ?? () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #33 0x00007fffee377166 in g_main_dispatch (context=0x6632f0) at /build/buildd/glib2.0-2.37.5/./glib/gmain.c:3065 #34 g_main_context_dispatch (context=context@entry=0x6632f0) at /build/buildd/glib2.0-2.37.5/./glib/gmain.c:3641 #35 0x00007fffee3774b8 in g_main_context_iterate (context=context@entry=0x6632f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.37.5/./glib/gmain.c:3712 #36 0x00007fffee37755c in g_main_context_iteration (context=0x6632f0, may_block=1) at /build/buildd/glib2.0-2.37.5/./glib/gmain.c:3773 #37 0x00007ffff22324bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #38 0x00007ffff21e9d3b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #39 0x00007ffff21ed120 in QCoreApplication::exec() () from /usr/local/Trolltech/Qt5/Qt-5.0.0-r40/lib/libQt5Core.so.5 #40 0x0000000000421ba0 in launcherMain (app=...) at /home/reni/Data/REPOS/webkit_sec/Tools/QtTestBrowser/qttestbrowser.cpp:49 #41 0x0000000000423680 in main (argc=2, argv=0x7fffffffdc38) at /home/reni/Data/REPOS/webkit_sec/Tools/QtTestBrowser/qttestbrowser.cpp:318
Attachments
Test case
(90 bytes, text/html)
2013-08-22 06:14 PDT
,
Renata Hodovan
no flags
Details
Proposed patch
(3.84 KB, patch)
2013-08-22 06:16 PDT
,
Renata Hodovan
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Renata Hodovan
Comment 1
2013-08-22 06:14:00 PDT
Created
attachment 209356
[details]
Test case
Renata Hodovan
Comment 2
2013-08-22 06:16:27 PDT
Created
attachment 209359
[details]
Proposed patch
Renata Hodovan
Comment 3
2013-08-23 01:27:48 PDT
Committed
r154476
: <
http://trac.webkit.org/changeset/154476
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug