[PATCH] D101175: [lld-macho] Fix use-after-free in loadDylib()

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 15:05:08 PDT 2021


int3 added a comment.

> Is there not any sanitizers build that would've caught this?

It *was* caught by a sanitizer in PR50101. The tricky bit here is that our tests don't trigger a hashmap resize (since the inputs are small), so the ASAN contbuilds didn't catch it.

(Maybe there's value in having a test mode where hashmaps are aggressively resized/rehashed, e.g. on every write. Much like how `llvm::sort` forces `std::sort` to be unstable to catch nondeterminism...)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101175/new/

https://reviews.llvm.org/D101175



More information about the llvm-commits mailing list