[compiler-rt] [asan,test] Disable _FORTIFY_SOURCE test incompatible with glibc 2.40 (PR #101566)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 15:12:03 PDT 2024
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/101566
>From 3177e573a79a057ea9f55e5659c5aea1c7c780ea Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Thu, 1 Aug 2024 15:00:25 -0700
Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
=?UTF-8?q?itial=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.5-bogner
---
compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c | 3 ++-
compiler-rt/test/lit.common.cfg.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c b/compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c
index c7522e4029ea1..86cf4ab0c9a22 100644
--- a/compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c
+++ b/compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c
@@ -1,7 +1,8 @@
// RUN: %clang -fPIC -shared -O2 -D_FORTIFY_SOURCE=2 -D_DSO %s -o %t.so
// RUN: %clang_asan -o %t %t.so %s
// RUN: not %run %t 2>&1 | FileCheck %s
-// REQUIRES: glibc-2.27
+/// Incompatible with pass_object_info style fortified source since glibc 2.40.
+// REQUIRES: glibc-2.27 && !glibc-2.40
#ifdef _DSO
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 70bf43e2fac59..281258ea7baf5 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -674,7 +674,7 @@ def add_glibc_versions(ver_string):
ver = LooseVersion(ver_string)
any_glibc = False
- for required in ["2.19", "2.27", "2.30", "2.33", "2.34", "2.37", "2.38"]:
+ for required in ["2.19", "2.27", "2.30", "2.33", "2.34", "2.37", "2.38", "2.40"]:
if ver >= LooseVersion(required):
config.available_features.add("glibc-" + required)
any_glibc = True
>From fd2cb6512d4f28fe79e48ca3d8cbecee3e99197f Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Thu, 1 Aug 2024 15:11:54 -0700
Subject: [PATCH 2/2] format
Created using spr 1.3.5-bogner
---
compiler-rt/test/lit.common.cfg.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 281258ea7baf5..ef84c6021f335 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -674,7 +674,16 @@ def add_glibc_versions(ver_string):
ver = LooseVersion(ver_string)
any_glibc = False
- for required in ["2.19", "2.27", "2.30", "2.33", "2.34", "2.37", "2.38", "2.40"]:
+ for required in [
+ "2.19",
+ "2.27",
+ "2.30",
+ "2.33",
+ "2.34",
+ "2.37",
+ "2.38",
+ "2.40",
+ ]:
if ver >= LooseVersion(required):
config.available_features.add("glibc-" + required)
any_glibc = True
More information about the llvm-commits
mailing list