https://github.com/halide/Halide
Raw File
Tip revision: a21837ff1e085f22ef380c65847202d7917950e7 authored by Steven Johnson on 06 February 2021, 00:10:51 UTC
Merge branch 'master' into srj/msan-dtf
Tip revision: a21837f
ssp.cpp
#include "HalideRuntime.h"
#include "runtime_internal.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(nullptr, "Memory error: stack smashing protector changed!\n");
    abort();
}
}
back to top