Closed
Bug 883688
Opened 11 years ago
Closed 11 years ago
Uninit |gotLambda| in ion/IonBuilder.cpp
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
(Whiteboard: [js:t])
Attachments
(1 file)
(deleted),
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
Clang correctly identifies this problem:
/home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4719:9: warning: variable 'gotLambda' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (calleeTypes) {
^~~~~~~~~~~
/home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4723:18: note: uninitialized use occurs here
JS_ASSERT_IF(gotLambda, originals.length() <= 1);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./dist/include/js/Utility.h:43:49: note: expanded from macro 'JS_ASSERT_IF'
#define JS_ASSERT_IF(cond, expr) MOZ_ASSERT_IF(cond, expr)
^
./dist/include/mozilla/Assertions.h:305:12: note: expanded from macro 'MOZ_ASSERT_IF'
if (cond) \
^~~~
/home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4719:5: note: remove the 'if' if its condition is always true
if (calleeTypes) {
^~~~~~~~~~~~~~~~~
/home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4717:19: note: initialize the variable 'gotLambda' to silence this warning
bool gotLambda;
^
= false
Assignee | ||
Comment 1•11 years ago
|
||
I don't anything about this code, but this fix looks reasonable.
Attachment #763303 -
Flags: review?(kvijayan)
Comment 2•11 years ago
|
||
Comment on attachment 763303 [details] [diff] [review]
Fix uninitialized |gotLambda| in ion/IonBuilder.cpp
Review of attachment 763303 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks Nicholas.
Attachment #763303 -
Flags: review?(kvijayan) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•11 years ago
|
Blocks: CVE-2013-1728
You need to log in
before you can comment on or make changes to this bug.
Description
•