diff options
author | 2021-08-19 13:16:00 -0700 | |
---|---|---|
committer | 2021-08-24 19:08:27 +0000 | |
commit | 9d642a84fbf39c65895ccd25c2b104b4917e43e8 (patch) | |
tree | ec5e9f9a6d8b86b7af9b686c7ff1148087a5a1a7 /test/971-iface-super/util-src/generate_java.py | |
parent | eba362de5efc844f3b97901564f4861b3f6a9e2b (diff) |
dex2oat: Avoid an open from /proc/self/fd
ReadCommentedInputStream reads a text file by line, filters out empty or
commented line, then send the line to a callback. The original
implementation uses ifstream and std::getline.
aosp/1734115 added a way to read the text file by FD. Since there
doesn't seem to be a way in C++ to convert the FD to an input stream,
it creates one by opening /proc/self/fd/43.
In the context of Comp OS, this requires giving dex2oat a special open
privilege to "authfs".
This change replaces ifstream/std::getline with f(d)open/getline(3).
Bug: 196404749
Test: TH
Test: Disallow open for dex2oat in microdroid, ComposHostTestCases still
pass
Ignore-AOSP-First: merge conflict resolution
Merged-In: I257f471b2afc80b6f1e1f8fa25248abc7ff5a3d5
Change-Id: I257f471b2afc80b6f1e1f8fa25248abc7ff5a3d5
Diffstat (limited to 'test/971-iface-super/util-src/generate_java.py')
0 files changed, 0 insertions, 0 deletions