# error Non-ptr stored in object results in GC_HAS_DEBUG_INFO malfunction
/* We may mistakenly conclude that p has a debugging wrapper. */
# endif
-# define GC_HAS_DEBUG_INFO(p) \
- ((*((word *)p) & 1) && GC_has_other_debug_info(p) > 0)
+# if defined(PARALLEL_MARK) && defined(KEEP_BACK_PTRS)
+# define GC_HAS_DEBUG_INFO(p) \
+ ((AO_load((volatile AO_t *)(p)) & 1) != 0 \
+ && GC_has_other_debug_info(p) > 0)
+ /* Atomic load is used as GC_store_back_pointer */
+ /* stores oh_back_ptr atomically (p might point */
+ /* to the field); this prevents a TSan warning. */
+# else
+# define GC_HAS_DEBUG_INFO(p) \
+ ((*(word *)(p) & 1) && GC_has_other_debug_info(p) > 0)
+# endif
#else
# define GC_HAS_DEBUG_INFO(p) (GC_has_other_debug_info(p) > 0)
-#endif
+#endif /* !KEEP_BACK_PTRS && !MAKE_BACK_GRAPH */
EXTERN_C_END