Closed
Bug 940825
Opened 12 years ago
Closed 12 years ago
Use of uninitialized value in nsDocumentViewer::PermitUnload()
Categories
(Core :: Layout, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: n.nethercote, Assigned: dagnir)
References
(Blocks 1 open bug)
Details
(Whiteboard: [mentor=jdm][lang=c++][good first bug][qa-])
Attachments
(1 file, 1 obsolete file)
Valgrind says:
> Conditional jump or move depends on uninitialised value(s)
> at 0x92671D2: nsDocumentViewer::PermitUnload(bool, bool*) (nsDocumentViewer.cpp:1105)
> by 0x9564FB2: nsDocShell::InternalLoad(nsIURI*, nsIURI*, nsISupports*, unsigned int, char16_t const*, char const*, nsAString_internal const&, nsIInputStream*, nsIInputStream*, unsigned int, nsISHEntry*, bool, nsAString_internal const&, nsIDocShell**, nsIRequest**) (nsDocShell.cpp:9404)
> by 0x955F8E7: nsDocShell::LoadURI(nsIURI*, nsIDocShellLoadInfo*, unsigned int, bool) (nsDocShell.cpp:1544)
> by 0x95779B9: nsWindowWatcher::OpenWindowInternal(nsIDOMWindow*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, nsIDOMWindow**) (nsWindowWatcher.cpp:907)
> by 0x9578B1C: nsWindowWatcher::OpenWindow2(nsIDOMWindow*, char const*, char const*, char const*, bool, bool, bool, nsISupports*, nsIDOMWindow**) (nsWindowWatcher.cpp:416)
> by 0x8C52FDD: nsGlobalWindow::OpenInternal(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsIPrincipal*, JSContext*, nsIDOMWindow**) (nsGlobalWindow.cpp:11165)
> by 0x8C52902: nsGlobalWindow::OpenInternal(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsIPrincipal*, JSContext*, nsIDOMWindow**) (nsGlobalWindow.cpp:11048)
> by 0x8C53C13: nsGlobalWindow::OpenJS(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, nsIDOMWindow**) (nsGlobalWindow.cpp:7222)
> by 0x8C4739F: nsGlobalWindow::Open(nsAString_internal const&, nsAString_internal const&, nsAString_internal const&, mozilla::ErrorResult&) (nsGlobalWindow.cpp:7189)
> by 0x8A30D58: mozilla::dom::WindowBinding::open(JSContext*, JS::Handle<JSObject*>, nsGlobalWindow*, JSJitMethodCallArgs const&) (WindowBinding.cpp:1199)
> by 0x8A1AEDD: mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*) (WindowBinding.cpp:8658)
> by 0x9C5B5AB: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
> by 0x9C548B9: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2502)
> by 0x9C5A293: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:420)
> by 0x9C5B545: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:482)
> Uninitialised value was created by a stack allocation
> at 0x9266F53: nsDocumentViewer::PermitUnload(bool, bool*) (nsDocumentViewer.cpp:1049)
It's easy to understand: utils->AreDialogsEnabled() can fail but this isn't
checked for.
roc said this isn't s-s.
Updated•12 years ago
|
Whiteboard: [mentor=jdm][lang=c++][good first bug]
Updated•12 years ago
|
Priority: -- → P4
Assignee | ||
Comment 1•12 years ago
|
||
Hello,
I'm interested in taking this on. I'm new to the Mozilla codebase. I'm assuming we just want to check to the return value of util->AreDialogsEnabled()?
![]() |
Reporter | |
Comment 2•12 years ago
|
||
I suspect just initializing dialogsWereEnabled to false would suffice, but I'm not familiar with this part of the code.
Assignee | ||
Comment 3•12 years ago
|
||
![]() |
Reporter | |
Comment 4•12 years ago
|
||
Comment on attachment 8335083 [details] [diff] [review]
ensure dialogsWereEnabled is initialized
Thanks, Dongie! When you upload a patch you usually need to ask someone to review it. Knowing who to ask can be tricky, but for this patch I've asked roc to do it.
BTW, the patch's form suggests that you've set up Mercurial nicely, which is great!
Attachment #8335083 -
Flags: review?(roc)
Attachment #8335083 -
Flags: review?(roc) → review+
Comment 5•12 years ago
|
||
I went to lunch after this bug was filed, and returned after it was fixed and approved. Good job everyone! Dongie, if you could attach a version with r=roc instead of r=reviewers, we could commit that to the tree :)
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Thanks everyone! I've updated the patch per Josh's instructions.
Updated•12 years ago
|
Keywords: checkin-needed
Updated•12 years ago
|
Assignee: nobody → dongie.agnir
Updated•12 years ago
|
Attachment #8335083 -
Attachment is obsolete: true
Comment 8•12 years ago
|
||
Keywords: checkin-needed
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•12 years ago
|
Whiteboard: [mentor=jdm][lang=c++][good first bug] → [mentor=jdm][lang=c++][good first bug][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•