Skip to content

Commit 3a6bc8c

Browse files
ZequanWuCrashpad LUCI CQ
authored and
Crashpad LUCI CQ
committed
[tests] Disable clang optimization on the infinite recursion function.
In the recent llvm upstream change, https://reviews.llvm.org/D148269, clang becomes smarter and will remove the infinite recursion function. Use the clang attribute __attribute__((optnone)) to disable optimization for it. Bug: chromium:1435016 Change-Id: I74e823bf64d0b03d81c0bda7a8338e2fa67033aa Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4456156 Reviewed-by: Mark Mentovai <[email protected]> Commit-Queue: Zequan Wu <[email protected]>
1 parent 0e3758b commit 3a6bc8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/crashpad_client_linux_test.cc

+3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ void ValidateDump(const StartHandlerForSelfTestOptions& options,
225225
#if defined(COMPILER_GCC)
226226
__attribute__((noinline))
227227
#endif
228+
#if defined(__clang__)
229+
__attribute__((optnone))
230+
#endif
228231
int RecurseInfinitely(int* ptr) {
229232
int buf[1 << 20];
230233
return *ptr + RecurseInfinitely(buf);

0 commit comments

Comments
 (0)