Avoid tail-call optimization in "violate" testcase

PiperOrigin-RevId: 364523883
Change-Id: I5e43534d7db37b4c16f18fc3326714664ab0ae00
This commit is contained in:
Wiktor Garbacz 2021-03-23 03:50:39 -07:00 committed by Copybara-Service
parent df840ae38f
commit 1be4d04f4e

View File

@ -77,4 +77,9 @@ extern "C" const void* get_raw_c_string() { return "Ten chars."; }
extern "C" void nop() {} extern "C" void nop() {}
extern "C" void violate() { ptrace((__ptrace_request)990, 991, 992, 993); } extern "C" void violate() {
ptrace((__ptrace_request)990, 991, 992, 993);
// Once more to avoid tail-call optimization, so that violate is in the
// stacktrace.
ptrace((__ptrace_request)990, 991, 992, 993);
}