Open Bug 1421804 Opened 2 years ago Updated 9 months ago

InvalidArrayIndex_CRASH in [@ SVGTextFrame::GetEndPositionOfChar]

Categories

(Core :: SVG, defect, P3)

59 Branch
defect

Tracking

()

Tracking Status
firefox59 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, testcase)

Attachments

(2 files)

Attached file testcase.html
==21915==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000056cad8 bp 0x7ffdaa57fdb0 sp 0x7ffdaa57fc40 T0)
==21915==The signal is caused by a WRITE memory access.
==21915==Hint: address points to the zero page.
    #0 0x56cad7 in MOZ_CrashPrintf /src/mfbt/Assertions.cpp:63:3
    #1 0x7fcd365c625b in InvalidArrayIndex_CRASH(unsigned long, unsigned long) /src/xpcom/ds/nsTArray.cpp:26:3
    #2 0x7fcd3e85b872 in ElementAt /src/obj-firefox/dist/include/nsTArray.h:1048:7
    #3 0x7fcd3e85b872 in operator[] /src/obj-firefox/dist/include/nsTArray.h:1086
    #4 0x7fcd3e85b872 in SVGTextFrame::GetEndPositionOfChar(nsIContent*, unsigned int, mozilla::nsISVGPoint**) /src/layout/svg/SVGTextFrame.cpp:4387
    #5 0x7fcd3cdfc058 in mozilla::dom::SVGTextContentElement::GetEndPositionOfChar(unsigned int, mozilla::ErrorResult&) /src/dom/svg/SVGTextContentElement.cpp:181:19
    #6 0x7fcd3a8198b1 in mozilla::dom::SVGTextContentElementBinding::getEndPositionOfChar(JSContext*, JS::Handle<JSObject*>, mozilla::dom::SVGTextContentElement*, JSJitMethodCallArgs const&) /src/obj-firefox/dom/bindings/SVGTextContentElementBinding.cpp:235:58
    #7 0x7fcd3b91ec07 in mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /src/dom/bindings/BindingUtils.cpp:3042:13
    #8 0x7fcd423dc571 in CallJSNative /src/js/src/jscntxtinlines.h:291:15
    #9 0x7fcd423dc571 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:473
    #10 0x7fcd423c7e5a in CallFromStack /src/js/src/vm/Interpreter.cpp:528:12
    #11 0x7fcd423c7e5a in Interpret(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:3098
    #12 0x7fcd423ae120 in js::RunScript(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:423:12
    #13 0x7fcd423dc9fe in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:495:15
    #14 0x7fcd423dd502 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) /src/js/src/vm/Interpreter.cpp:541:10
    #15 0x7fcd42ed80cc in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /src/js/src/jsapi.cpp:3036:12
    #16 0x7fcd3b26c7be in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260:37
    #17 0x7fcd3bdc8233 in Call<nsISupports *> /src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362:12
    #18 0x7fcd3bdc8233 in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) /src/dom/events/JSEventHandler.cpp:215
    #19 0x7fcd3bd8e1f1 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) /src/dom/events/EventListenerManager.cpp:1111:51
    #20 0x7fcd3bd90102 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) /src/dom/events/EventListenerManager.cpp:1286:20
    #21 0x7fcd3bd7a69f in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /src/dom/events/EventDispatcher.cpp:462:16
    #22 0x7fcd3bd7dfd5 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /src/dom/events/EventDispatcher.cpp:826:9
    #23 0x7fcd3e2ddb21 in nsDocumentViewer::LoadComplete(nsresult) /src/layout/base/nsDocumentViewer.cpp:1070:7
    #24 0x7fcd4164d662 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /src/docshell/base/nsDocShell.cpp:7878:21
    #25 0x7fcd4164958a in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7671:7
    #26 0x7fcd4165138f in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp
    #27 0x7fcd385aeec7 in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /src/uriloader/base/nsDocLoader.cpp:1319:3
    #28 0x7fcd385ae0d1 in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /src/uriloader/base/nsDocLoader.cpp:862:14
    #29 0x7fcd385aad64 in nsDocLoader::DocLoaderIsEmpty(bool) /src/uriloader/base/nsDocLoader.cpp:751:9
    #30 0x7fcd385acd9c in nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:633:5
    #31 0x7fcd385adcbc in non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp
    #32 0x7fcd3687295a in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /src/netwerk/base/nsLoadGroup.cpp:629:28
    #33 0x7fcd392d2d9b in imgRequestProxy::RemoveFromLoadGroup() /src/image/imgRequestProxy.cpp:413:15
    #34 0x7fcd392dc047 in imgRequestProxy::OnLoadComplete(bool) /src/image/imgRequestProxy.cpp:1096:7
    #35 0x7fcd39310dd9 in operator() /src/image/ProgressTracker.cpp:360:13
    #36 0x7fcd39310dd9 in void mozilla::image::ImageObserverNotifier<mozilla::image::ObserverTable const*>::operator()<void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::{lambda(mozilla::image::IProgressObserver*)#7}>(void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::{lambda(mozilla::image::IProgressObserver*)#7}) /src/image/ProgressTracker.cpp:285
    #37 0x7fcd3930e7d3 in void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) /src/image/ProgressTracker.cpp:359:5
    #38 0x7fcd39255b9e in operator() /src/image/ProgressTracker.cpp:380:5
    #39 0x7fcd39255b9e in Read<(lambda at /src/image/ProgressTracker.cpp:379:19)> /src/image/CopyOnWrite.h:154
    #40 0x7fcd39255b9e in mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) /src/image/ProgressTracker.cpp:379
    #41 0x7fcd39262fce in mozilla::image::RasterImage::NotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<unsigned int> const&, mozilla::image::DecoderFlags, mozilla::image::SurfaceFlags) /src/image/RasterImage.cpp:1675:28
    #42 0x7fcd39275e36 in NotifyForLoadEvent /src/image/RasterImage.cpp:977:3
    #43 0x7fcd39275e36 in mozilla::image::RasterImage::NotifyDecodeComplete(mozilla::image::DecoderFinalStatus const&, mozilla::image::ImageMetadata const&, mozilla::image::DecoderTelemetry const&, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<unsigned int> const&, mozilla::image::DecoderFlags, mozilla::image::SurfaceFlags) /src/image/RasterImage.cpp:1762
    #44 0x7fcd39250f87 in operator() /src/image/IDecodingTask.cpp:130:12
    #45 0x7fcd39250f87 in mozilla::detail::RunnableFunction<mozilla::image::IDecodingTask::NotifyDecodeComplete(mozilla::NotNull<mozilla::image::RasterImage*>, mozilla::NotNull<mozilla::image::Decoder*>)::$_2>::Run() /src/xpcom/threads/nsThreadUtils.h:529
    #46 0x7fcd366b212e in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1033:14
    #47 0x7fcd366cdeb0 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:508:10
    #48 0x7fcd37541efa in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
    #49 0x7fcd37495ba9 in RunInternal /src/ipc/chromium/src/base/message_loop.cc:326:10
    #50 0x7fcd37495ba9 in RunHandler /src/ipc/chromium/src/base/message_loop.cc:319
    #51 0x7fcd37495ba9 in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299
    #52 0x7fcd3d9db96a in nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:157:27
    #53 0x7fcd41ed7a4b in nsAppStartup::Run() /src/toolkit/components/startup/nsAppStartup.cpp:288:30
    #54 0x7fcd420f0418 in XREMain::XRE_mainRun() /src/toolkit/xre/nsAppRunner.cpp:4649:22
    #55 0x7fcd420f324e in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4811:8
    #56 0x7fcd420f46c4 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4903:21
    #57 0x4f2ca5 in do_main /src/browser/app/nsBrowserApp.cpp:231:22
    #58 0x4f2ca5 in main /src/browser/app/nsBrowserApp.cpp:304
    #59 0x7fcd5522382f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
    #60 0x4224cc in _start (firefox+0x4224cc)
Flags: in-testsuite?
Attached file prefs.js
Priority: -- → P3
See Also: → 1429191

I don't think this crashes any more.

You need to log in before you can comment on or make changes to this bug.