Skip to content

cmd/compile: building with -asan generates many more allocations than with other instrumentation modes #70079

Closed as not planned

Description

@mknyszek

I'm not really sure what the trouble is yet, but this does seem to be true given how many allocation count tests failed on asan but not with race or msan.

For example, tests failed on the new msan builder: https://ci.chromium.org/ui/p/golang/builders/ci/gotip-linux-amd64-msan-clang15/b8732829196319772801/overview

This mostly aligns with skips for race mode.

But with asan, there are many more: https://ci.chromium.org/ui/p/golang/builders/ci/gotip-linux-amd64-asan-clang15/b8732829195285565617/test-results?sortby=&groupby=

These tests will be skipped for now, so this is low priority. But anyone interested in improving the performance of asan mode might consider looking here first.

Discovered during #70054.

Activity

  1. added this to the Backlog milestone on Oct 28, 2024
  2. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Oct 28, 2024
  3. gabyhelp commented on Oct 28, 2024

    @gabyhelp
  4. gopherbot commented on Oct 28, 2024

    @gopherbot
    Contributor

    Change https://go.dev/cl/622855 mentions this issue: all: skip and fix various tests with -asan and -msan

  5. mknyszek commented on Oct 30, 2024

    @mknyszek
    ContributorAuthor

    In triage, I am told this may be totally intentional. ASAN doesn't work quite so well with stack pointers, so it intentionally forces a lot more to the heap, like every pointer converted to an unsafe.Pointer.

  6. gopherbot commented on Nov 1, 2024

    @gopherbot
    Contributor

    Change https://go.dev/cl/623957 mentions this issue: [release-branch.go1.23] all: skip and fix various tests with -asan and -msan

  7. gopherbot commented on Mar 4, 2025

    @gopherbot
    Contributor

    Change https://go.dev/cl/654835 mentions this issue: context: skip TestAllocs when using ASAN

  8. locked and limited conversation to collaborators on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.help wanted

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions