Only allow Unicode strings out of the python configure sandbox
Categories
(Firefox Build System :: General, task)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(8 files, 1 obsolete file)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
It only happens when things go badly, which is why it doesn't cause
problems, but when moving things around, triggering the error, we
currently get a formatting error rather than the actual error.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Because most calling places in python configure don't actually want to
deal with encodings, although in practical terms they should, make
get_cmd_output handle it itself.
Places that explicitly do want bytes can keep using subprocess directly.
Assignee | ||
Comment 6•5 years ago
|
||
As a consequence, we can replace the encoded_open function that did the
same in an opt-in manner.
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Make it a hard error when the sandbox returns non-unicode strings.
This should help quickly catch any remaining non-unicode string that
are not caught by automation.
Assignee | ||
Comment 9•5 years ago
|
||
The configure sandbox has wrapped subprocess methods to do it since
bug 1520394.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/e0b2831af074 Remove unused subprocess imports. r=nalexander https://hg.mozilla.org/integration/autoland/rev/38e02cd63d8d Define whether the system encoding is mbcs or utf-8 once. r=nalexander https://hg.mozilla.org/integration/autoland/rev/fd9f4d8f171b Fix mock_pkg_config failure case. r=nalexander https://hg.mozilla.org/integration/autoland/rev/f3e3d13c202a Use functions from util.configure instead of subprocess.*. r=nalexander https://hg.mozilla.org/integration/autoland/rev/9b73ac45f717 Change get_cmd_output to emit unicode strings. r=nalexander https://hg.mozilla.org/integration/autoland/rev/2139ee18939e Make configure sandbox open() look more like python 3's. r=nalexander https://hg.mozilla.org/integration/autoland/rev/7e4b8df1e96a Return an unicode path for nodejs. r=nalexander https://hg.mozilla.org/integration/autoland/rev/b651185f9573 Make configure complain on non-unicode strings. r=nalexander
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e0b2831af074
https://hg.mozilla.org/mozilla-central/rev/38e02cd63d8d
https://hg.mozilla.org/mozilla-central/rev/fd9f4d8f171b
https://hg.mozilla.org/mozilla-central/rev/f3e3d13c202a
https://hg.mozilla.org/mozilla-central/rev/9b73ac45f717
https://hg.mozilla.org/mozilla-central/rev/2139ee18939e
https://hg.mozilla.org/mozilla-central/rev/7e4b8df1e96a
https://hg.mozilla.org/mozilla-central/rev/b651185f9573
Description
•