[PATCH] D66189: [GWP-ASan] Implement stack frame compression.

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 19:28:51 PDT 2019


vlad.tsyrklevich added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:78
+  if (Backtrace) {
+    uintptr_t *UncompressedBuffer =
+        static_cast<uintptr_t *>(alloca(MaxTraceLength * sizeof(uintptr_t)));
----------------
Use a VLA instead of allocas, here and below.


================
Comment at: compiler-rt/lib/gwp_asan/options.inc:28
 
+GWP_ASAN_OPTION(
+    int, MaxTraceLength, 128,
----------------
Why make this an option? I don't see why users would need to tune it, I'd set it to something reasonable (64?) and just leave it as a constant.


================
Comment at: compiler-rt/lib/gwp_asan/stack_trace_compressor.cpp:10
+#include "gwp_asan/stack_trace_compressor.h"
+
+namespace gwp_asan {
----------------
Most of these implementations vary from the ones in Chrome, I'd consider just using the same ones (modulo style differences) for consistency.


================
Comment at: compiler-rt/lib/gwp_asan/stack_trace_compressor.h:9
+
+#ifndef GWP_ASAN_STACK_TRACE_COMPRESSION_
+#define GWP_ASAN_STACK_TRACE_COMPRESSION_
----------------
COMPRESSION -> COMPRESSOR


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66189





More information about the llvm-commits mailing list