[PATCH] D139827: [RISCV][Asan] Use dynamic shadow offset to make it work on different width of virtual-memory system.

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 09:42:08 PDT 2023


kito-cheng added a comment.

In D139827#4614214 <https://reviews.llvm.org/D139827#4614214>, @palmer-dabbelt wrote:

> If I'm reading this right, anything built with ASAN will fail on sv48 or sv57?  We're defaulting the mmap() hints to sv48 because we didn't have any failing workloads there (Hotspot and Go fail sv57), but if this fails we should probably default to sv37.  Is there a reproducer bouncing around we can put in kselftests?

I guess you might confused by `SANITIZER_MMAP_RANGE_SIZE`, it a parameter for internal memory allocator, set for larger Sv is always works on smaller Sv but less memory efficiency.

And the original reason fail on the Sv48/Sv57 is because most setting is Sv sensitive (`kRISCV64_ShadowOffset64`), and we try make it into Sv insensitive by trading few more runtime performance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139827



More information about the llvm-commits mailing list