Use actual ptrace() arguments in example

The semantics of the example remain unchanged. This change is in preparation
for the new Clang based header generator, which will parse most files in C++
mode. `ptrace`'s first argument cannot me implicitly converted from `int` in
C++.

PiperOrigin-RevId: 343280691
Change-Id: Ibc5318b19a48f1dad441e7dcdc318dc5ea6837f6
This commit is contained in:
Christian Blichmann 2020-11-19 06:46:58 -08:00 committed by Copybara-Service
parent e6bb05a15d
commit eaff70b558

View File

@ -64,7 +64,9 @@ extern void crash(void) {
}
extern void violate(void) {
ptrace(990, 991, 992, 993);
// Issue a PTRACE_CONT that will always fail, since we are not in stopped
// state. The actual call should be caught by the sandbox policy.
ptrace(PTRACE_CONT, 0, NULL, NULL);
}
extern int sumarr(int* input, size_t nelem) {