[Static Analysis] DEAD_STORE errors in js/src/frontend/Parser.cpp

RESOLVED FIXED in Firefox 63

Status

()

P3
normal
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: rbartlensky, Assigned: rbartlensky)

Tracking

unspecified
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 months ago
js/src/frontend/Parser.cpp:1837: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  1835.
  1836.           bindings->constStart = cursor - start;
  1837. >         cursor = FreshlyInitializeBindings(cursor, consts);
  1838.
  1839.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:1907: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  1905.
  1906.           bindings->constStart = cursor - start;
  1907. >         cursor = FreshlyInitializeBindings(cursor, consts);
  1908.
  1909.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:1947: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  1945.           BindingName* cursor = start;
  1946.
  1947. >         cursor = FreshlyInitializeBindings(cursor, vars);
  1948.
  1949.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:2046: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  2044.
  2045.           bindings->varStart = cursor - start;
  2046. >         cursor = FreshlyInitializeBindings(cursor, vars);
  2047.
  2048.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:2087: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  2085.           BindingName* cursor = start;
  2086.
  2087. >         cursor = FreshlyInitializeBindings(cursor, vars);
  2088.
  2089.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:2144: error: DEAD_STORE
  The value written to &cursor (type js::BindingName*) is never used.
  2142.
  2143.           bindings->constStart = cursor - start;
  2144. >         cursor = FreshlyInitializeBindings(cursor, consts);
  2145.
  2146.           bindings->length = numBindings;

js/src/frontend/Parser.cpp:4857: error: DEAD_STORE
  The value written to &declKind (type int) is never used.
  4855.               // Annex B.3.5 has different early errors for vars in for-of loops.
  4856.               if (declKind == DeclarationKind::Var)
  4857. >                 declKind = DeclarationKind::ForOfVar;
  4858.           } else {
  4859.               *forHeadKind = ParseNodeKind::ForHead;
Comment hidden (mozreview-request)

Comment 2

8 months ago
mozreview-review
Comment on attachment 8993048 [details]
Bug 1476657: Fix DEAD_STORE issues in js/src/frontend/Parser.cpp.

https://reviewboard.mozilla.org/r/257854/#review264852

Thanks!
Attachment #8993048 - Flags: review?(arai.unmht) → review+
(Assignee)

Updated

8 months ago
Keywords: checkin-needed

Comment 3

8 months ago
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d259e78aa9c
Fix DEAD_STORE issues in js/src/frontend/Parser.cpp. r=arai
Keywords: checkin-needed

Comment 4

8 months ago
Backout by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a88fbbebadcc
Backed out changeset 6d259e78aa9c for bustage in /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp on a CLOSED TREE
(Assignee)

Comment 5

8 months ago
It seems that someone solved the issues already.
(Assignee)

Updated

8 months ago
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → FIXED
(Assignee)

Comment 6

8 months ago
My bad, my tree wasn't merged properly...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Comment 9

8 months ago
I added 'Unused << ' everywhere, could you confirm that it is fine?
Flags: needinfo?(arai.unmht)
yes, looks good :)
Flags: needinfo?(arai.unmht)
(Assignee)

Updated

8 months ago
Keywords: checkin-needed

Comment 11

8 months ago
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/358b59601fb9
Fix DEAD_STORE issues in js/src/frontend/Parser.cpp. r=arai
Keywords: checkin-needed

Comment 12

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/358b59601fb9
Status: REOPENED → RESOLVED
Last Resolved: 8 months ago8 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.