Last Comment Bug 710996 - Possible double-assignment in JS_GetValidFrameCalleeObject()
: Possible double-assignment in JS_GetValidFrameCalleeObject()
Status: RESOLVED FIXED
[pvs-studio]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Felix Fung (:felix)
:
Mentors:
Depends on:
Blocks: 710966
  Show dependency treegraph
 
Reported: 2011-12-14 23:54 PST by Justin Dolske [:Dolske]
Modified: 2011-12-16 05:57 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Double-assignment in JS_GetValidFrameCalleeObject() (820 bytes, patch)
2011-12-15 00:32 PST, Felix Fung (:felix)
dmandelin: review+
Details | Diff | Review

Description Justin Dolske [:Dolske] 2011-12-14 23:54:07 PST
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;
}
Comment 1 Felix Fung (:felix) 2011-12-15 00:32:35 PST
Created attachment 581905 [details] [diff] [review]
Double-assignment in JS_GetValidFrameCalleeObject()
Comment 2 David Mandelin [:dmandelin] 2011-12-15 14:18:52 PST
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.
Comment 4 Ed Morley [:emorley] 2011-12-16 05:57:54 PST
https://hg.mozilla.org/mozilla-central/rev/6388d336d451

Note You need to log in before you can comment on or make changes to this bug.