https://github.com/halide/Halide
Raw File
Tip revision: 825d863e7bd82bc00ca59be3934e1a0199a45dd2 authored by Andrew Adams on 22 May 2018, 21:11:35 UTC
Add stripped-down version of simplifier
Tip revision: 825d863
ssp.cpp
#include "HalideRuntime.h"

// LLVM sometimes likes to generate calls to a stack smashing
// protector, but some build environments (e.g. native client), don't
// provide libssp reliably. We define two weak symbols here to help
// things along.

extern "C" {

WEAK char *__stack_chk_guard = (char *)(0xdeadbeef);

WEAK void __stack_chk_fail() {
    halide_error(NULL, "Memory error: stack smashing protector changed!\n");
    abort();
}

}
back to top