[BUG] AGY crashes on arm64

agy crashes on linux-arm64 with 39-bit VA because bundled TCMalloc assumes 48-bit VA

Hey folks, I’m seeing agy crash immediately on startup, before it can even print --version.

This looks like the Linux arm64 build is assuming a 48-bit userspace virtual address range

through bundled TCMalloc. My device is running with a 39-bit ARM64 userspace VA limit, so

TCMalloc tries to reserve/tag memory at addresses the kernel can’t provide.

## Product

Google Antigravity / agy CLI

## Version

  • Debian package: antigravity 1.23.2-1776332230 arm64

  • CLI path: /root/.local/bin/agy

  • CLI SHA256: 958492b523a5c467c394b62a078f2e2ca37fd18a117d239708662b07bbe2c5ea

## Environment

  • OS: Debian GNU/Linux 13 (trixie)

  • Runtime: LXC container on an Android device

  • Architecture: aarch64

  • Kernel: Linux debian 6.1.162-HachimiDingdongjiCCB #4 SMP PREEMPT Fri Apr 24 09:15:20 JST 2026

    aarch64 GNU/Linux

  • Page size: 4096

Kernel VA config:

CONFIG_ARM64_4K_PAGES=y

# CONFIG_ARM64_16K_PAGES is not set

# CONFIG_ARM64_64K_PAGES is not set

CONFIG_ARM64_VA_BITS_39=y

# CONFIG_ARM64_VA_BITS_48 is not set

CONFIG_ARM64_VA_BITS=39

## Repro

/root/.local/bin/agy --version

I also tried these, but they all crash the same way:

LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2 /root/.local/bin/agy --version

TCMALLOC_ADDRESS_BITS=39 /root/.local/bin/agy --version

TCMALLOC_HEAP_PARTITIONING=false /root/.local/bin/agy --version

## Expected

agy --version should print the CLI version and exit.

If this kernel setup is unsupported, agy should say that directly instead of aborting inside

TCMalloc.

The process aborts before printing anything useful:

third_party/tcmalloc/internal/system_allocator.h:595] MmapAligned() failed - unable to allocate

with tag (hint=0xe48c0000000, size=1073741824, alignment=1073741824) - is something limiting

address placement?

third_party/tcmalloc/internal/system_allocator.h:602] Note: the allocation may have failed

because TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc

with TCMALLOC_ADDRESS_BITS defined to your system’s virtual address space size

third_party/tcmalloc/arena.cc:61] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate

internal tcmalloc data (bytes=131072, object-size=16384); is something preventing mmap from

succeeding (sandbox, VSS limitations)?

Aborted

Exit code: 134

This doesn’t look like normal memory pressure. The failing allocation is trying to use address

placement above the 39-bit userspace limit.

Because this is LXC on Android, I can’t fix it by installing a different Debian kernel inside

the container. The process still runs on the Android host kernel.

LD_PRELOAD with jemalloc doesn’t help either, because agy appears to have TCMalloc allocation

symbols compiled into the binary.

I also tested a ptrace wrapper that rewrites high mmap addresses below the 39-bit limit. That

gets past the kernel rejection, but TCMalloc then aborts because it uses MAP_FIXED_NOREPLACE and

checks the returned address against its original high address. So this probably needs a build/

configuration fix, not a syscall wrapper.

Could you ship a Linux arm64 agy build that works with 39-bit ARM64 userspace VA?

Possible fixes would be building TCMalloc with TCMALLOC_ADDRESS_BITS=39, avoiding a bundled

allocator that assumes 48-bit VA, or detecting this setup at startup and printing a clear

unsupported-platform error.