[Bug 2142105] [NEW] Address Sanitizer extremely slow on ARM

rustyx 2142105 at bugs.launchpad.net
Wed Feb 18 11:02:11 UTC 2026


Public bug reported:

ASAN is extremely slow on ARM64 (aarch64) in Ubuntu 24.04.

Tried with GCC 13, GCC 14, clang 17 and clang 20 - same issue.

Here's a minimal repro:
https://github.com/rustyx/json-test-asan

On Ubuntu 24.04 with GCC 14:

$ make
$ ./json-test-asan 
Parsing took 4626 ms
$ ./json-test-no-asan 
Parsing took 8 ms

On Debian 13 with GCC 14 there is no such slowdown:
$ make
$ ./json-test-asan 
Parsing took 26 ms
$ ./json-test-no-asan 
Parsing took 8 ms

Note - this happens on ARM only. There is no slowdown on amd64 or x86.

perf shows most CPU time is spent in:
71.90%  [.] __asan_stack_malloc_0
27.28%  [.] __asan_stack_malloc_1

Running with ASAN_OPTIONS=detect_stack_use_after_return=0 "fixes" the
issue, but obviously disables an important check so is not a solution.

** Affects: gcc-14 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-14 in Ubuntu.
https://bugs.launchpad.net/bugs/2142105

Title:
  Address Sanitizer extremely slow on ARM

Status in gcc-14 package in Ubuntu:
  New

Bug description:
  ASAN is extremely slow on ARM64 (aarch64) in Ubuntu 24.04.

  Tried with GCC 13, GCC 14, clang 17 and clang 20 - same issue.

  Here's a minimal repro:
  https://github.com/rustyx/json-test-asan

  On Ubuntu 24.04 with GCC 14:

  $ make
  $ ./json-test-asan 
  Parsing took 4626 ms
  $ ./json-test-no-asan 
  Parsing took 8 ms

  On Debian 13 with GCC 14 there is no such slowdown:
  $ make
  $ ./json-test-asan 
  Parsing took 26 ms
  $ ./json-test-no-asan 
  Parsing took 8 ms

  Note - this happens on ARM only. There is no slowdown on amd64 or x86.

  perf shows most CPU time is spent in:
  71.90%  [.] __asan_stack_malloc_0
  27.28%  [.] __asan_stack_malloc_1

  Running with ASAN_OPTIONS=detect_stack_use_after_return=0 "fixes" the
  issue, but obviously disables an important check so is not a solution.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-14/+bug/2142105/+subscriptions




More information about the foundations-bugs mailing list