Possible double-assignment in JS_GetValidFrameCalleeObject()

RESOLVED FIXED in mozilla11

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Dolske, Assigned: felix)

Tracking

(Blocks: 1 bug)

unspecified
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [pvs-studio])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
From http://www.viva64.com/en/a/0078/,
20th section in http://www.viva64.com/external-pictures/txt/mozilla-test.txt

V519 The '* vp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 711, 712.
jsdbgapi.cpp 712

JS_PUBLIC_API(JSBool)
JS_GetValidFrameCalleeObject(JSContext *cx, JSStackFrame *fp, jsval *vp)
{
    Value v;

    if (!Valueify(fp)->getValidCalleeObject(cx, &v))
        return false;
    *vp = v.isObject() ? v : JSVAL_VOID;
    *vp = v;
    return true;
}
(Reporter)

Updated

6 years ago
Blocks: 710966
(Assignee)

Comment 1

6 years ago
Created attachment 581905 [details] [diff] [review]
Double-assignment in JS_GetValidFrameCalleeObject()
Assignee: general → ffung
Status: NEW → ASSIGNED
Attachment #581905 - Flags: review?(jorendorff)
Comment on attachment 581905 [details] [diff] [review]
Double-assignment in JS_GetValidFrameCalleeObject()

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

This one looks like an actual bug.
Attachment #581905 - Flags: review?(jorendorff) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6388d336d451

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/6388d336d451
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.