vere icon indicating copy to clipboard operation
vere copied to clipboard

Issues with running AddressSanitizer using Bazel toolchains

Open ashelkovnykov opened this issue 1 year ago • 1 comments

Trying to enable AddressSanitizer in the current build is incredibly frustrating, and there's still no known configuration to do so.

The existing workaround is:

  1. Add 'asan' config to .bazelrc:
    build:asan --strip=never
    build:asan --copt -fsanitize=address
    build:asan --copt -DADDRESS_SANITIZER
    build:asan --copt -O1
    build:asan --copt -g
    build:asan --copt -fomit-frame-pointer
    build:asan --linkopt -fsanitize=address
    
  2. CC=/usr/bin/gcc-11 bazel build --force_ignore_dash_static --config asan :urbit
    1. This will fail with The above will fail with: "gcc-11: error: cannot specify -static with -fsanitize=address"
  3. sudo sed -i 's//-static/' bazel-out/k8-fastbuild/bin/pkg/vere/urbit-2.params
  4. /usr/bin/gcc-11 @bazel-out/k8-fastbuild/bin/pkg/vere/urbit-2.params

ashelkovnykov avatar Apr 18 '23 15:04 ashelkovnykov

need #347

barter-simsum avatar Apr 19 '23 15:04 barter-simsum