Closed Bug 970001 Opened 6 years ago Closed 6 years ago

Valgrind detects leak - 1 bytes are definitely lost (direct) involving sourcePolicy

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox30 --- affected

People

(Reporter: gkw, Assigned: jorendorff)

Details

(Keywords: testcase, valgrind)

Attachments

(2 files)

Attached file stack
evaluate("", ({
    sourcePolicy: ''
}))

shows "1 bytes in 1 blocks are definitely lost" on m-c changeset cafe909f7e07 with --ion-parallel-compile=off.

valgrind --vex-iropt-register-updates=allregs-at-mem-access --leak-check=full --smc-check=all-non-file ./js-opt-64-dm-vg-ts-er-linux-cafe909f7e07 --ion-parallel-compile=off testcase.js

Not sure who should get involved here, setting needinfo from jorendorff as a start.

My configure flags are:

AR=ar sh ./configure --enable-optimize=-O1 --disable-debug --enable-profiling --enable-gczeal --enable-debug-symbols --enable-methodjit --enable-type-inference --disable-tests --enable-more-deterministic --enable-exact-rooting --enable-valgrind --with-ccache --enable-threadsafe <other NSPR options>
Flags: needinfo?(jorendorff)
Yeah, this is trivial, patch coming.
Assignee: nobody → jorendorff
Flags: needinfo?(jorendorff)
I don't think I've ever seen a 1 byte leak before. LOL.
I found a few other leaky-in-error-cases uses of JS_Encode*, too, and switched them to JSAutoByteString.
Attachment #8374124 - Flags: review?(till)
Comment on attachment 8374124 [details] [diff] [review]
bug-970001-leak-v1.patch

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

nice
Attachment #8374124 - Flags: review?(till) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6deadaf3af44
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.