[PATCH] D97726: [sanitizers] [windows] Use InternalMmapVector instead of silencing -Wframe-larger-than
    Vitaly Buka via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar  1 14:54:33 PST 2021
    
    
  
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp:50
+  InternalMmapVector<CONTEXT> ctx_buf(1);
+  CONTEXT &ctx = ctx_buf[0];
+  ctx = *(CONTEXT *)context;
----------------
This called unwind slow and usually called infrequently, but user can 
set fast_unwind_on_malloc=false and make it frequent.
So it's not nice that we make it slower.
You can try:
```
NOINLINE
static void UnwindSlowInternal(uptr pc, void *context, u32 max_depth, STACKFRAME64*) {
}
void BufferedStackTrace::UnwindSlow(uptr pc, void *context, u32 max_depth) {
  CONTEXT ctx = *(CONTEXT *)context;
  STACKFRAME64 stack_frame;
  UnwindSlowInternal(...., &stack_frame)
}
```
And also I don't know if all these are worth of hassle. Maybe we can just raise limit for -Wframe-larger-than=
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97726/new/
https://reviews.llvm.org/D97726
    
    
More information about the llvm-commits
mailing list