[compiler-rt] [sanitizer_common] Implement address sanitizer on AIX: add platform specific functionality (4/n) (PR #131868)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 24 10:42:32 PDT 2025


================
@@ -0,0 +1,47 @@
+//===-- sanitizer_aix.h -----------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is shared between various sanitizers' runtime libraries and
+// provides definitions for AIX-specific functions.
+//===----------------------------------------------------------------------===//
+#ifndef SANITIZER_AIX_H
+#define SANITIZER_AIX_H
+
+#include "sanitizer_platform.h"
+
+#if SANITIZER_AIX
+#  include "sanitizer_common.h"
+#  include "sanitizer_posix.h"
+
+namespace __sanitizer {
+
+#  if SANITIZER_WORDSIZE == 32
+static const uptr InstructionStart = 0x10000000;
+#  else
+static const uptr InstructionStart = 0x100000000;
+#  endif
----------------
hubert-reinterpretcast wrote:

The logic behind this is not correct and should not be used.
The value can be specified at link time for any shared object via `-bpT`. Indeed, GCC on AIX does not use different `-bpT` options between 32-bit and 64-bit.


https://github.com/llvm/llvm-project/pull/131868


More information about the llvm-commits mailing list