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

RESOLVED FIXED in mozilla30

Status

()

defect
--
major
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gkw, Assigned: jorendorff)

Tracking

(Blocks 1 bug, {testcase, valgrind})

Trunk
mozilla30
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox30 affected)

Details

Attachments

(2 attachments)

Posted 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.