/src/tarantool/third_party/luajit/src/lj_assert.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | ** Internal assertions. |
3 | | ** Copyright (C) 2005-2020 Mike Pall. See Copyright Notice in luajit.h |
4 | | */ |
5 | | |
6 | | #define lj_assert_c |
7 | | #define LUA_CORE |
8 | | |
9 | | #if defined(LUA_USE_ASSERT) || defined(LUA_USE_APICHECK) |
10 | | |
11 | | #include <stdio.h> |
12 | | |
13 | | #include "lj_obj.h" |
14 | | |
15 | | void lj_assert_fail(global_State *g, const char *file, int line, |
16 | | const char *func, const char *fmt, ...) |
17 | 0 | { |
18 | 0 | va_list argp; |
19 | 0 | va_start(argp, fmt); |
20 | 0 | fprintf(stderr, "LuaJIT ASSERT %s:%d: %s: ", file, line, func); |
21 | 0 | vfprintf(stderr, fmt, argp); |
22 | 0 | fputc('\n', stderr); |
23 | 0 | va_end(argp); |
24 | 0 | UNUSED(g); /* May be NULL. TODO: optionally dump state. */ |
25 | 0 | abort(); |
26 | 0 | } |
27 | | |
28 | | #endif |