| Issue |
243075
|
| Summary |
[sanitizer] Add support for QNX in UBSAN, ASAN and LSAN
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Helflym
|
This issue aims to track the work to enable support for QNX operating system within the sanitizers.
The initial patchset was developed for a GCC toolchain. Even though there isn't any LLVM backend for that operating system, I'd like to contribute it. This whole patchset, ported for LLVM, is available within this [branch](https://github.com/Helflym/llvm-project/tree/mr/sanitizer-qnx).
Only QNX version 8.0 running on AARCH64 is supported. Other architectures (x86_64 mostly) and previous versions were not tested.
---
Some implementation details and limitation.
### ASAN
Since `MAP_NORESERVE` is a not available, ASAN cannot reserve its shadow memory during its initialization. Instead, it's being dynamically allocated before any new access. This comes with a few downsides:
- assembly optimizations allowing direct shadow memory accesses are not supported. Instead, the ASAN runtime must always be called since it takes care checking the allocation. It mostly means `-fsanitize-address-outline-instrumentation` is mandatory.
- The shadow memory and its gap cannot be protected. Those cannot reserve. Therefore, nothing prevents an user to allocate something within the range of the shadow memory, which would thereafter become corrupted. As a result, address randomization cannot be supported.
### LSAN
Threads registers are not supported.
---
# Merge requests status
## Merged
## In review
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs