Uninitialised value uses related to class FetchEventRunnable

RESOLVED FIXED in Firefox 39

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jseward, Assigned: jdm)

Tracking

Trunk
mozilla39
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(1 attachment)

Observed when running mochitests on valgrind:

/tests/dom/workers/test/serviceworkers/test_controller.html

Conditional jump or move depends on uninitialised value(s)
   at 0x6A3DFD8: IsDependentOn (xpcom/string/nsTSubstring.h:1023)
   by 0x6A3DFD8: nsAString_internal::Assign(char16_t const*, unsigned int, mozilla::fallible_t const&) (xpcom/string/nsTSubstring.cpp:313)
   by 0x6A3E168: nsAString_internal::Assign(nsAString_internal const&, mozilla::fallible_t const&) (xpcom/string/nsTSubstring.cpp:409)
   by 0x6A3E18D: nsAString_internal::Assign(nsAString_internal const&) (xpcom/string/nsTSubstring.cpp:365)
   by 0x81BA3ED: operator= (ff-Og-linux64/dom/workers/../../dist/include/nsTSubstring.h:457)
   by 0x81BA3ED: mozilla::dom::workers::FetchEventRunnable::DispatchFetchEvent(JSContext*, mozilla::dom::workers::WorkerPrivate*) (dom/workers/ServiceWorkerManager.cpp:2233)
   by 0x81BA9D0: mozilla::dom::workers::FetchEventRunnable::WorkerRun(JSContext*, mozilla::dom::workers::WorkerPrivate*) (dom/workers/ServiceWorkerManager.cpp:2201)
   by 0x818E2CB: mozilla::dom::workers::WorkerRunnable::Run() (dom/workers/WorkerRunnable.cpp:326)
   by 0x6A90752: nsThread::ProcessNextEvent(bool, bool*) (xpcom/threads/nsThread.cpp:855)
   by 0x6AB1487: NS_ProcessNextEvent(nsIThread*, bool) (xpcom/glue/nsThreadUtils.cpp:265)
   by 0x81A1853: mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*) (dom/workers/WorkerPrivate.cpp:4670)
   by 0x817AC90: (anonymous namespace)::WorkerThreadPrimaryRunnable::Run() (dom/workers/RuntimeService.cpp:2678)
   by 0x6A90752: nsThread::ProcessNextEvent(bool, bool*) (xpcom/threads/nsThread.cpp:855)
   by 0x6AB1487: NS_ProcessNextEvent(nsIThread*, bool) (xpcom/glue/nsThreadUtils.cpp:265)
   by 0x6D27801: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (ipc/glue/MessagePump.cpp:368)
   by 0x6D07512: MessageLoop::RunInternal() (ipc/chromium/src/base/message_loop.cc:233)
   by 0x6D0751E: MessageLoop::RunHandler() (ipc/chromium/src/base/message_loop.cc:226)
   by 0x6D077AC: MessageLoop::Run() (ipc/chromium/src/base/message_loop.cc:200)
   by 0x6A93C7F: nsThread::ThreadFunc(void*) (xpcom/threads/nsThread.cpp:356)
   by 0x506651E: _pt_root (nsprpub/pr/src/pthreads/ptthread.c:212)
   by 0x317E807529: start_thread (/usr/src/debug/glibc-2.20/nptl/pthread_create.c:310)
   by 0x317E50079C: clone (/usr/src/debug////////glibc-2.20/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109)

Uninitialised value was created by a stack allocation
   at 0x81BA30D: mozilla::dom::workers::FetchEventRunnable::DispatchFetchEvent(JSContext*, mozilla::dom::workers::WorkerPrivate*) (dom/workers/ServiceWorkerManager.cpp:2225)
Assignee: nobody → josh
Depends on: 1065216
Comment on attachment 8570095 [details] [diff] [review]
Fix incorrect initialization of Request object

Julian, could you give this a shot?
Attachment #8570095 - Flags: feedback?(jseward)
Comment on attachment 8570095 [details] [diff] [review]
Fix incorrect initialization of Request object

Review of attachment 8570095 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.  With the patch, I no longer see the Valgrind complaint.
Attachment #8570095 - Flags: feedback?(jseward) → feedback+
Attachment #8570095 - Flags: review?(bzbarsky)
Comment on attachment 8570095 [details] [diff] [review]
Fix incorrect initialization of Request object

r=me
Attachment #8570095 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/937ee04a8408
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.