11extern "C" __declspec(dllexport)
void dummy() {}
14#if defined(__has_feature)
15#if __has_feature(undefined_behavior_sanitizer)
20 int* segfault =
nullptr;
34 "./process_test <outstream> <echocount> <exitcode> <crash>\n");
38 int outstream = atoi(
argv[1]);
39 if (outstream < 0 || outstream > 2) {
40 fprintf(stderr,
"unknown outstream");
45 int echo_count = atoi(
argv[2]);
46 int exit_code = atoi(
argv[3]);
47 int crash = atoi(
argv[4]);
53 const int kLineSize = 128;
56 while ((echo_count != echo_counter) &&
57 (fgets(
line, kLineSize, stdin) !=
nullptr)) {
59 fprintf(stdout,
"%s",
line);
61 }
else if (outstream == 1) {
62 fprintf(stderr,
"%s",
line);
64 }
else if (outstream == 2) {
65 fprintf(stdout,
"%s",
line);
66 fprintf(stderr,
"%s",
line);
__attribute__((visibility("default"))) int RunBenchmarks(int argc
int main(int argc, char *argv[])