123 Star 2 Fork 25

src-openEuler/jemalloc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-Fix-clang-test-fail-in-align_alloc.c.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
严莹 提交于 2024-09-07 15:16 +08:00 . Fix clang test fail in align_alloc.c
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/jemalloc.git
git@gitee.com:src-openeuler/jemalloc.git
src-openeuler
jemalloc
jemalloc
master

搜索帮助