代码拉取完成,页面将自动刷新
From c59c02ff8028cc393a3029ea15cb7591d2bc2d4a Mon Sep 17 00:00:00 2001
From: yanyir <goodonya.yy@gmail.com>
Date: Sat, 7 Sep 2024 16:07:37 +0800
Subject: [PATCH] Fix clang test fail in align_alloc.c - Add attribute to
compile test_alignment_errors and test_oom_errors with no optimization if
build with clang
---
test/integration/aligned_alloc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c
index 41ec4fef..eb6fa0d6 100644
--- a/test/integration/aligned_alloc.c
+++ b/test/integration/aligned_alloc.c
@@ -13,7 +13,10 @@ purge(void) {
"Unexpected mallctl error");
}
-TEST_BEGIN(test_alignment_errors) {
+#if __clang__
+__attribute__((optnone))
+#endif
+TEST_BEGIN(test_alignment_errors) {
size_t alignment;
void *p;
@@ -45,7 +48,10 @@ TEST_END
JEMALLOC_DIAGNOSTIC_PUSH
JEMALLOC_DIAGNOSTIC_IGNORE_ALLOC_SIZE_LARGER_THAN
-TEST_BEGIN(test_oom_errors) {
+#if __clang__
+__attribute__((optnone))
+#endif
+TEST_BEGIN(test_oom_errors) {
size_t alignment, size;
void *p;
--
2.41.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。