Skip to content

Segmentation fault when building with ASan #42

Description

@djwenren

I always get segmentation fault when building with ASan on. Here is the way to trigger the problem

bazel run --copt=-fsanitize=address --linkopt=-fsanitize=address tcmalloc/testing:hello_main

It appears the seg fault happens before the main function is called as I added a quick print as the first statement in main and it was not printed. The seg fault goes away if I remove the "malloc = "//tcmalloc" in the cc_binary target.

I use the LLVM 10 toolchain on Ubuntu 20.04. Bazel version 3.4.1. TCMalloc is at commit 65bf455.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions