Skip to content

Commit b0198f2

Browse files
committed
thirdparty/libgc: reapply the V patch to make -cc gcc-11 -cstrict pass in more cases
1 parent c926e1c commit b0198f2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • thirdparty/libgc

thirdparty/libgc/gc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38748,6 +38748,7 @@ GC_suspend_handler_inner(ptr_t dummy, void *context)
3874838748
GC_log_printf("Suspending %p\n", PTHREAD_TO_VPTR(pthread_self()));
3874938749
# endif
3875038750
me = GC_lookup_self_thread_async();
38751+
if (NULL == me) return; // __v_, make the sanitizers and -cstrict happy
3875138752
if ((me->last_stop_count & ~(word)THREAD_RESTARTED) == my_stop_count) {
3875238753
/* Duplicate signal. OK if we are retrying. */
3875338754
if (!GC_retry_signals) {
@@ -41005,7 +41006,10 @@ GC_INNER void
4100541006
GC_reset_finalizer_nested(void)
4100641007
{
4100741008
GC_ASSERT(I_HOLD_LOCK());
41008-
GC_self_thread_inner()->crtn->finalizer_nested = 0;
41009+
GC_thread me;
41010+
me = GC_self_thread_inner();
41011+
if (NULL == me) return; // __v_, make the sanitizers and -cstrict happy
41012+
me->crtn->finalizer_nested = 0;
4100941013
}
4101041014

4101141015
GC_INNER unsigned char *
@@ -41026,6 +41030,7 @@ GC_check_finalizer_nested(void)
4102641030
if (UNLIKELY(NULL == me))
4102741031
return NULL;
4102841032
# endif
41033+
if (NULL == me) return NULL; // __v_, make the sanitizers and -cstrict happy
4102941034
crtn = me->crtn;
4103041035
nesting_level = crtn->finalizer_nested;
4103141036
if (nesting_level) {

0 commit comments

Comments
 (0)