diff --git a/prism/prism.c b/prism/prism.c index 45817cdd8c05b2..186cdd354c9843 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -13849,6 +13849,18 @@ parse_write(pm_parser_t *parser, pm_node_t *target, pm_token_t *operator, pm_nod // syntax error. In this case we'll fall through to our default // handling. We need to free the value that we parsed because there // is no way for us to attach it to the tree at this point. + switch (PM_NODE_TYPE(value)) { + case PM_LOCAL_VARIABLE_READ_NODE: + case PM_IT_LOCAL_VARIABLE_READ_NODE: + // Since it is possible for the value to be an implicit + // parameter, we need to remove it from the list of implicit + // parameters. + parse_target_implicit_parameter(parser, value); + break; + default: + break; + } + pm_node_destroy(parser, value); } PRISM_FALLTHROUGH @@ -22620,7 +22632,7 @@ static const char * pm_strnstr(const char *big, const char *little, size_t big_length) { size_t little_length = strlen(little); - for (const char *big_end = big + big_length; big < big_end; big++) { + for (const char *max = big + big_length - little_length; big <= max; big++) { if (*big == *little && memcmp(big, little, little_length) == 0) return big; } diff --git a/process.c b/process.c index 46c55abcce42c6..8d6953282aaa41 100644 --- a/process.c +++ b/process.c @@ -4011,7 +4011,10 @@ retry_fork_async_signal_safe(struct rb_process_status *status, int *ep, while (1) { prefork(); disable_child_handler_before_fork(&old); -#ifdef HAVE_WORKING_VFORK + + // Older versions of ASAN does not work with vfork + // See https://github.com/google/sanitizers/issues/925 +#if defined(HAVE_WORKING_VFORK) && !defined(RUBY_ASAN_ENABLED) if (!has_privilege()) pid = vfork(); else