At compile-time, create an array of {PC,HumanReadableStackFrameDescription}
for every function that has an instrumented frame, and pass this array
to the run-time at the module-init time.
Similar to how we handle pc-table in SanitizerCoverage.
The run-time is dummy, will add the actual logic in later commits.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 23760 Build 23759: arc lint + arc unit
Event Timeline
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
151 | s/_/- | |
217 | "fd" usually stands for file descriptor | |
319 | This section should be read-only so the (intrusive) linked list idea would not work. I don't think this slot helps you avoid a module pass. You can create a call to __hwasan_init_fd regardless. You are inserting multiple calls to __hwasan_init_fd to the ctor function. Just one would be enough. Ctor function should be comdat'ed itself, but that's orthogonal. | |
742 | Why would F's name start with "hwasan"? Did you mean "__hwasan"? |
addressed review comments
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
151 | done. | |
217 | renamed the section to hwasan_frames and the callback to hwasan_init_frames | |
319 | Ok, won't use the (intrusive) linked list.
Nope. This code is in HWAddressSanitizer::doInitialization(Module &M)
Yep, will do separately. | |
742 | No, this one is for the CTOR (HwasanCtorFunction above) |
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
318 | Why do we need a frame description for the ctor in order to call it? |
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
318 | We don't. |
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
742 | Why not compare F with HwasanCtorFunction? |
address one more comment
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | ||
---|---|---|
742 | Yep, done. |
s/_/-