Skip to content

Commit 3902205

Browse files
committed
Replace vfork with fork for ASAN
Older versions of ASAN do not support vfork. See google/sanitizers#925
1 parent 026140b commit 3902205

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

process.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4011,7 +4011,10 @@ retry_fork_async_signal_safe(struct rb_process_status *status, int *ep,
40114011
while (1) {
40124012
prefork();
40134013
disable_child_handler_before_fork(&old);
4014-
#ifdef HAVE_WORKING_VFORK
4014+
4015+
// Older versions of ASAN does not work with vfork
4016+
// See https://github.com/google/sanitizers/issues/925
4017+
#if defined(HAVE_WORKING_VFORK) && !defined(RUBY_ASAN_ENABLED)
40154018
if (!has_privilege())
40164019
pid = vfork();
40174020
else

0 commit comments

Comments
 (0)