Skip to content

ASan/UBSan‑instrumented Harbour crashes during self‑build on Termux/ARM64 (clang) #403

@bertrandsoullier

Description

@bertrandsoullier

When Harbour is rebuilt with AddressSanitizer/UndefinedBehaviorSanitizer
on Termux/ARM64, the ASan‑instrumented harbour binary crashes while
compiling harbinit.prg. The build aborts before installation completes.

This report is separate from my other ticket to keep issues focused.

Environment

  • ARM64 (aarch64)
  • Android 15 / Termux
  • clang toolchain
  • Harbour 3.2.0dev (59f2c65)

Build flags

HBBUILDDEBUG=yes
HBBUILDOPTIM=no
HBUSERCFLAGS="-fsanitize=address,undefined -g"
HBUSERLDFLAGS="-fsanitize=address,undefined"

Output during build

../../../../../bin/linux/gcc/harbour ../../../harbinit.prg
-i../../../../../include -n1 -q0 -w3 -es2 -kmo -i-

==6933==WARNING: external symbolizer didn't start up correctly!
make[3]: * [harbinit.c] Broken pipe
make[2]: * [../../config/lib.mk:68: descend] Error 2
make[1]: * [../config/dir.mk:71: vm] Error 2
make: * [config/dir.mk:71: src] Error 2

Notes

  • The crash occurs inside the ASan‑instrumented compiler itself.
  • It happens before the instrumented harbour binary is installed.
  • Disabling symbolization (ASAN_OPTIONS="symbolize=0") does not prevent the abort.
  • No .ppo writing or file‑system race involved.

Expected

Harbour should be able to self‑compile under ASan/UBSan, or at least
fail with a diagnostic instead of a broken pipe.

Actual

The compiler aborts while processing harbinit.prg.

Request

Could this be investigated as a potential undefined‑behaviour hotspot
triggered by clang/ASan on ARM64?
I can run additional builds, provide logs, or test patches if needed.

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