commit | 6342e0bc38b060a34784d7d63374aa35fc9f1707 | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Fri Apr 01 12:49:05 2022 -0700 |
committer | Yabin Cui <yabinc@google.com> | Fri Apr 01 13:05:35 2022 -0700 |
tree | 30ffe372c149209764e25214cb445d490dd94eab | |
parent | c3cc93bbe0030a4ff53f17e07629a193cebad959 [diff] |
simpleperf: fix a segfault caused by CloseEventFiles. In aosp/2052096, simpleperf closes event files when stopping recording. After that, GetEventAttrWithId()[0].ids is empty, which makes ProcessJITDebugInfo() segfault. To fix it, save result of GetEventAttrWithId() in dumping_attr_id_ when preparing recording, and use dumping_attr_id_ in ProcessJITDebugInfo(). Bug: 227220328 Test: run simpleperf_unit_test Change-Id: I99678ff5defc7ca998a08b2cec22f7a84d1ed7bd