2023-03-02 21:09:05 +08:00
|
|
|
#include "sandboxed_api/sandbox2/testcases/symbolize_lib.h"
|
|
|
|
|
|
|
|
#include "absl/base/attributes.h"
|
|
|
|
|
|
|
|
ABSL_ATTRIBUTE_NOINLINE
|
|
|
|
ABSL_ATTRIBUTE_NO_TAIL_CALL
|
|
|
|
void LibRecurseA(void (*cb)(int), int data, int n);
|
|
|
|
|
2023-03-06 16:21:29 +08:00
|
|
|
ABSL_ATTRIBUTE_NOINLINE
|
|
|
|
ABSL_ATTRIBUTE_NO_TAIL_CALL
|
|
|
|
void LibCallCallback(void (*cb)(int), int data) { cb(data); }
|
|
|
|
|
2023-03-02 21:09:05 +08:00
|
|
|
ABSL_ATTRIBUTE_NOINLINE
|
|
|
|
ABSL_ATTRIBUTE_NO_TAIL_CALL
|
|
|
|
void LibRecurseB(void (*cb)(int), int data, int n) {
|
|
|
|
if (n > 1) {
|
|
|
|
return LibRecurseA(cb, data, n - 1);
|
|
|
|
}
|
2023-03-06 16:21:29 +08:00
|
|
|
return LibCallCallback(cb, data);
|
2023-03-02 21:09:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void LibRecurseA(void (*cb)(int), int data, int n) {
|
|
|
|
if (n > 1) {
|
|
|
|
return LibRecurseB(cb, data, n - 1);
|
|
|
|
}
|
2023-03-06 16:21:29 +08:00
|
|
|
return LibCallCallback(cb, data);
|
2023-03-02 21:09:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void LibRecurse(void (*cb)(int), int data, int n) { LibRecurseA(cb, data, n); }
|