1 #include "HalideRuntime.h" 2 #include "runtime_internal.h" 3 4 // LLVM sometimes likes to generate calls to a stack smashing 5 // protector, but some build environments (e.g. native client), don't 6 // provide libssp reliably. We define two weak symbols here to help 7 // things along. 8 9 extern "C" { 10 11 WEAK char *__stack_chk_guard = (char *)(0xdeadbeef); 12 __stack_chk_fail()13WEAK void __stack_chk_fail() { 14 halide_error(NULL, "Memory error: stack smashing protector changed!\n"); 15 halide_abort(); 16 } 17 } 18