Fix stack traces on Fedora

This fixes the main issue (#118) with stack traces on Fedora, which uses a
`/lib64` and `/usr/lib64`.

PiperOrigin-RevId: 437717858
Change-Id: I6986aa84c2be57ae1d9f8d0cb9b508768d27f1c1
This commit is contained in:
Christian Blichmann 2022-03-28 04:04:53 -07:00 committed by Copybara-Service
parent 1e42edc62f
commit f928f1dd7c

View File

@ -142,7 +142,9 @@ absl::StatusOr<std::unique_ptr<Policy>> StackTracePeer::GetPolicy(
// Add all possible libraries without the need of parsing the binary // Add all possible libraries without the need of parsing the binary
// or /proc/pid/maps. // or /proc/pid/maps.
for (const auto& library_path : { for (const auto& library_path : {
"/usr/lib64",
"/usr/lib", "/usr/lib",
"/lib64",
"/lib", "/lib",
}) { }) {
if (access(library_path, F_OK) != -1) { if (access(library_path, F_OK) != -1) {