2020-03-16 08:43:57 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "bh_assert.h"
|
|
|
|
|
2021-10-14 01:12:07 +00:00
|
|
|
void
|
|
|
|
bh_assert_internal(int v, const char *file_name, int line_number,
|
|
|
|
const char *expr_string)
|
2020-03-16 08:43:57 +00:00
|
|
|
{
|
|
|
|
if (v)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (!file_name)
|
|
|
|
file_name = "NULL FILENAME";
|
|
|
|
|
|
|
|
if (!expr_string)
|
|
|
|
expr_string = "NULL EXPR_STRING";
|
|
|
|
|
2021-10-14 01:12:07 +00:00
|
|
|
os_printf("\nASSERTION FAILED: %s, at file %s, line %d\n", expr_string,
|
|
|
|
file_name, line_number);
|
2020-03-16 08:43:57 +00:00
|
|
|
|
2020-11-24 06:00:09 +00:00
|
|
|
abort();
|
2020-03-16 08:43:57 +00:00
|
|
|
}
|