Skip to content

Commit

Permalink
Do not use GC_noop1_ptr() for functional pointers
Browse files Browse the repository at this point in the history
(fix of commit 0ca8be5)

Issue #627 (bdwgc).

* os_dep.c [(NEED_FIND_LIMIT || UNIX_LIKE || WRAP_MARK_SOME)
&& CPPCHECK && ADDRESS_SANITIZER] (GC_set_and_save_fault_handler):
Use GC_noop1((word)(GC_funcptr_uint)&fn) instead of GC_noop1_ptr(&fn).
* os_dep.c [MPROTECT_VDB && !DARWIN && CPPCHECK && ADDRESS_SANITIZER]
(GC_dirty_init): Likewise.
  • Loading branch information
ivmai committed Jun 14, 2024
1 parent 0de30c3 commit 203e12f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ GC_INNER void GC_setpagesize(void)
# endif
# endif /* !USE_SEGV_SIGACT */
# if defined(CPPCHECK) && defined(ADDRESS_SANITIZER)
GC_noop1_ptr(&__asan_default_options);
GC_noop1((word)(GC_funcptr_uint)&__asan_default_options);
# endif
}
#endif /* NEED_FIND_LIMIT || UNIX_LIKE || WRAP_MARK_SOME */
Expand Down Expand Up @@ -3504,7 +3504,7 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void)
# endif
# endif /* !MSWIN32 && !MSWINCE */
# if defined(CPPCHECK) && defined(ADDRESS_SANITIZER)
GC_noop1_ptr(&__asan_default_options);
GC_noop1((word)(GC_funcptr_uint)&__asan_default_options);
# endif
return TRUE;
}
Expand Down

0 comments on commit 203e12f

Please sign in to comment.