Landing: e712b42c5e01
Project / Subsystem
gcc / risc-v
Date
2026-04-28
Author
Maximilian Ciric
Commit
e712b42c5e01d70bc9868c5c7e3953c531ec08e3
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- risc-v
- patch_id
- —
- commit_hash
- e712b42c5e01d70bc9868c5c7e3953c531ec08e3
- source_type
- github
- headline
- Enable address tagging on 64-bit RISC-V with pointer masking.
- tldr
- GCC now supports hardware-assisted address sanitization (HWASan) on RISC-V 64-bit architectures with pointer masking.
- author
- Maximilian Ciric
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- gcc:risc-v: enable address tagging on 64-bit targets supporting pointer masking
- series_parts
- []
- tags
-
- • risc-v
- • hwasan
- • memory safety
- • sanitization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-04-28T00:00:00.000Z
This patch enables hardware-assisted address sanitization (HWASan) for RISC-V 64-bit targets that support the pointer masking extension. It implements TARGET_MEMTAG_CAN_TAG_ADDRESSES and TARGET_MEMTAG_TAG_BITSIZE to allow the use of -fsanitize=hwaddress. This improves memory safety by detecting memory errors at runtime, useful where software-based sanitizers are too slow.