Closed Bug 669434 Opened 8 years ago Closed 8 years ago
File Helper bugs
Free patch attached, needs tests. The bogus assertion is tripped by, e.g., $ echo "1 + 2" > /tmp/3.js $ ./DBG/js < /tmp/3.js and the buffer overrun is triggered by, e.g. (and this may be the only way), $ ./DBG/js -f /dev/zero Free fix to unsightly lack of vertical space in JS_InitStandardClasses included. Nick, can you add tests and land? /be
(In reply to comment #0) > Nick, can you add tests and land? Sure, thanks for finding.
Same as Brendan's patch, but with an extra comment. I have no idea how to invoke these two commands with our testing scripts: js < foo.js js -f /dev/zero Waldo, do you know?
Make a C++ test using jsapi-tests? Or maybe add /dev/zero to a jstest.list for jstests?
Comment on attachment 544393 [details] [diff] [review] patch, v2 (In reply to comment #3) > Make a C++ test using jsapi-tests? Or maybe add /dev/zero to a jstest.list > for jstests? The latter doesn't work, because jstests.py requires the entries in jstest.list be relative paths. The former would work but seems overkill, and adds an extra .cpp file to builds. Brendan, I think the best option is to not bother testing. The |js < foo.js| case was a trivial incorrect assertion, and the |js -f /dev/zero| case could only happen with files that lied about their size; the only ones I know about like that are /dev/zero and /dev/random. What do you think?
Attachment #544393 - Flags: feedback?(jwalden+bmo) → review?(brendan)
Comment on attachment 544393 [details] [diff] [review] patch, v2 Ideally we'd use Python's noted ability to handle full pathnames, check for /dev/zero, etc., but it's not important right now. Thanks, /be
Attachment #544393 - Flags: review?(brendan) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.