mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-25 22:30:49 +08:00
[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 <mark@chromium.org> Commit-Queue: Zequan Wu <zequanwu@google.com>
This commit is contained in:
parent
0e3758bef6
commit
3a6bc8c527
@ -225,6 +225,9 @@ void ValidateDump(const StartHandlerForSelfTestOptions& options,
|
||||
#if defined(COMPILER_GCC)
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
#if defined(__clang__)
|
||||
__attribute__((optnone))
|
||||
#endif
|
||||
int RecurseInfinitely(int* ptr) {
|
||||
int buf[1 << 20];
|
||||
return *ptr + RecurseInfinitely(buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user