Closed Bug 504395 Opened 15 years ago Closed 15 years ago

SimulateImacroCFG leaks tmp_pcstack when LOCAL_ASSERT fails

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

1241 #define LOCAL_ASSERT_CUSTOM(expr, BAD_EXIT) \ 
1242     JS_BEGIN_MACRO \
1243         JS_ASSERT(expr); \
1244         if (!(expr)) { BAD_EXIT; } \
1245     JS_END_MACRO
1247 #define LOCAL_ASSERT_RV(expr, rv) \
1248     LOCAL_ASSERT_CUSTOM(expr, return (rv))
5277 #define LOCAL_ASSERT(expr)      LOCAL_ASSERT_RV(expr, -1);

5342     jsbytecode** tmp_pcstack = (jsbytecode **) JS_malloc(cx, nbytes);
5362             LOCAL_ASSERT(jmpoff >= 0);
5378     LOCAL_ASSERT(pc == target);
Attached patch patchSplinter Review
Attachment #388766 - Flags: review?(graydon)
Attachment #388766 - Flags: review?(graydon) → review+
Comment on attachment 388766 [details] [diff] [review]
patch

All hail Coverity. Thanks for the fix :)
http://hg.mozilla.org/mozilla-central/rev/288a10ff331d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: