Skip to content

Commit b5a53a3

Browse files
committed
TASK-214337 send to paniclog
1 parent 86aa780 commit b5a53a3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/lgc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,9 +1969,9 @@ static void validate_heap_objects(lua_State *L, const char *where)
19691969
TAILQ_FOREACH(o, &L->heap->objects, allocd) {
19701970
if ((uintptr_t)o == poison ||
19711971
((uintptr_t)o & 0x7) != 0 ||
1972-
o->tt > 11 ||
1972+
o->tt > LUA_TGLOBAL ||
19731973
(o->marked & FREEDBIT)) {
1974-
fprintf(stderr,
1974+
thrlua_log(L, DCRITICAL,
19751975
"thrlua HEAP CORRUPT [%s] L=%p heap=%p count=%d bad_node=%p"
19761976
" (tt=%d marked=0x%x)\n",
19771977
where, (void*)L, (void*)L->heap, count, (void*)o,
@@ -1980,7 +1980,7 @@ static void validate_heap_objects(lua_State *L, const char *where)
19801980
abort();
19811981
}
19821982
if (o->owner != L->heap) {
1983-
fprintf(stderr,
1983+
thrlua_log(L, DCRITICAL,
19841984
"thrlua HEAP CORRUPT [%s] L=%p heap=%p count=%d node=%p"
19851985
" owner=%p (expected %p) tt=%d\n",
19861986
where, (void*)L, (void*)L->heap, count, (void*)o,
@@ -1989,7 +1989,7 @@ static void validate_heap_objects(lua_State *L, const char *where)
19891989
}
19901990
count++;
19911991
if (count > 10000000) {
1992-
fprintf(stderr,
1992+
thrlua_log(L, DCRITICAL,
19931993
"thrlua HEAP CORRUPT [%s] L=%p heap=%p: list cycle detected\n",
19941994
where, (void*)L, (void*)L->heap);
19951995
abort();
@@ -2177,8 +2177,8 @@ static void trace_heap(GCheap *h)
21772177
ck_pr_store_32(&h->owner->xref_count, 0);
21782178
TAILQ_FOREACH(o, &h->objects, allocd) {
21792179
if ((uintptr_t)o == poison || ((uintptr_t)o & 0x7) != 0 ||
2180-
o->tt > 11 || (o->marked & FREEDBIT)) {
2181-
fprintf(stderr,
2180+
o->tt > LUA_TGLOBAL || (o->marked & FREEDBIT)) {
2181+
thrlua_log(h->owner, DCRITICAL,
21822182
"thrlua HEAP CORRUPT [trace_heap] heap=%p owner=%p bad_node=%p"
21832183
" (tt=%d marked=0x%x)\n",
21842184
(void*)h, (void*)h->owner, (void*)o,

0 commit comments

Comments
 (0)