Skip to content

Commit b5fa4fe

Browse files
authored
[lsan] Fix compilation on Android (#113003)
1 parent 561f915 commit b5fa4fe

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler-rt/lib/lsan/lsan_common.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,14 @@ static void ProcessThread(tid_t os_id, uptr sp,
521521
}
522522
}
523523
# if SANITIZER_ANDROID
524+
extra_ranges.clear();
524525
auto *cb = +[](void *dtls_begin, void *dtls_end, uptr /*dso_idd*/,
525526
void *arg) -> void {
526-
ScanForPointers(
527-
reinterpret_cast<uptr>(dtls_begin), reinterpret_cast<uptr>(dtls_end),
528-
reinterpret_cast<Frontier *>(arg), "DTLS", kReachable, accessor);
527+
reinterpret_cast<InternalMmapVector<Range> *>(arg)->push_back(
528+
{reinterpret_cast<uptr>(dtls_begin),
529+
reinterpret_cast<uptr>(dtls_end)});
529530
};
530-
531+
ScanRanges(extra_ranges, frontier, "DTLS", accessor);
531532
// FIXME: There might be a race-condition here (and in Bionic) if the
532533
// thread is suspended in the middle of updating its DTLS. IOWs, we
533534
// could scan already freed memory. (probably fine for now)

0 commit comments

Comments
 (0)