Index: compiler-rt/trunk/lib/ubsan_minimal/ubsan_minimal_handlers.cc =================================================================== --- compiler-rt/trunk/lib/ubsan_minimal/ubsan_minimal_handlers.cc +++ compiler-rt/trunk/lib/ubsan_minimal/ubsan_minimal_handlers.cc @@ -5,9 +5,14 @@ #include #include +#ifdef KERNEL_USE +extern "C" void ubsan_message(const char *msg); +static void message(const char *msg) { ubsan_message(msg); } +#else static void message(const char *msg) { write(2, msg, strlen(msg)); } +#endif static const int kMaxCallerPcs = 20; static __sanitizer::atomic_uintptr_t caller_pcs[kMaxCallerPcs];