|UnicodeDecodeError: 'ascii' codec can't decode byte| when running |mach jstests|
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox76 | --- | unaffected |
firefox77 | --- | unaffected |
firefox78 | --- | fixed |
People
(Reporter: mgaudet, Assigned: rstewart)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
./mach jstests
[ 17| 0| 0| 0] 0% > | 13.9sTraceback (most recent call last):
File "/home/matthew/unified/js/src/tests/jstests.py", line 676, in <module>
sys.exit(main())
File "/home/matthew/unified/js/src/tests/jstests.py", line 624, in main
results.push(out)
File "/home/matthew/unified/js/src/tests/lib/results.py", line 247, in push
result = TestResult.from_output(output)
File "/home/matthew/unified/js/src/tests/lib/results.py", line 176, in from_output
if test.error not in err:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 222: ordinal not in range(128)
Doing a little tweaking, and printing err
, and we see the error triggers here:
[ 18| 0| 0| 0] 0% > | 14.0s/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 SyntaxError: illegal character:
/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 var ⸯ; // U+2E2F
/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 ....^
Where presumably U+2E2F is what's making python fall over.
For further debugging, I put
print(err)
print(type(err))
print(type(test.error))
sys.stdout.flush()
just above the
if test.error is not None:
That prints out pretty much the same thing in the good and bad cases:
[ 17| 0| 0| 0] 0% > | 14.0s/home/matthew/unified/js/src/tests/test262/language/identifiers/val-with-via-escape-hex.js:17:4 SyntaxError: with is an invalid identifier:
/home/matthew/unified/js/src/tests/test262/language/identifiers/val-with-via-escape-hex.js:17:4 var \u{77}ith = 123;
/home/matthew/unified/js/src/tests/test262/language/identifiers/val-with-via-escape-hex.js:17:4 ....^
<type 'str'>
<type 'unicode'>
[ 18| 0| 0| 0] 0% > | 14.0s/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 SyntaxError: illegal character:
/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 var ⸯ; // U+2E2F
/home/matthew/unified/js/src/tests/test262/language/identifiers/vertical-tilde-start.js:17:4 ....^
<type 'str'>
<type 'unicode'>
Here's where my python foo runs aground.
Reporter | ||
Comment 1•4 years ago
|
||
Ran hg bisect
to find the regressing changeset:
The first bad revision is:
changeset: 593977:b79ab69854b0
user: Ricky Stewart <rstewart@mozilla.com>
date: Tue May 05 20:32:12 2020 +0000
summary: Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
This patch gets me back in action, but definitely seems wrong
diff --git a/js/src/tests/lib/results.py b/js/src/tests/lib/results.py
--- a/js/src/tests/lib/results.py
+++ b/js/src/tests/lib/results.py
@@ -173,7 +173,7 @@ class TestResult:
if test.error is not None:
expected_rcs.append(3)
- if test.error not in err:
+ if test.error not in unicode(err, 'utf-8'):
failures += 1
results.append((cls.FAIL, "Expected uncaught error: {}".format(test.error)))
Ricky, not sure what to do about this.
For me this reproduces easily enough on a clobber build with the following mozconfig:
ac_add_options --enable-application=js
ac_add_options --enable-optimize
ac_add_options --enable-debug
#ac_add_options --disable-debug
# ac_add_options --enable-smoosh
ac_add_options --enable-tests
ac_add_options --enable-binast
# Dump opt builds into another dir.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-opt-shell-@CONFIG_GUESS@
Comment 3•4 years ago
|
||
Comment 4•4 years ago
|
||
Set release status flags based on info from the regressing bug 1632916
Assignee | ||
Comment 5•4 years ago
|
||
Bug 1632916 regressed mach jstests
, which still run under Python 2 (unlike the in-build jstests
, which use Python 3). Here we call into different logic for Python 2 and 3 to make sure there aren't type mismatches down the line.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•