Skip to content

[BUG] hwasan miscompilation #2064

@fmayer

Description

@fmayer

Description

Given this program

float frexpf(float, int*);

int main() {
  int e;
  float m = frexpf(1, &e);
  __asm volatile("": :"w"(m));
  return 0;
}

Built like this

clang -c \
  -target aarch64-linux-android10000 \
  -O2 -flto=thin -fsanitize=hwaddress \
  -o test.o \
  test.c
ld.lld -r test.o -o partial.o

NDK 27 generates code that crashes with a HWASan tag-mismatch. This is a regression compared to NDK 26c.

This is being fixed in upstream LLVM in llvm/llvm-project#106624

Affected versions

r27

Canary version

No response

Host OS

Linux

Host OS version

Debian

Affected ABIs

arm64-v8a

Build system

Other (specify below)

Other build system

No response

minSdkVersion

n/a

Device API level

No response

Metadata

Metadata

Labels

Type

No type

Projects

Status

Prebuilts submitted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions