Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion prism/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
5 changes: 4 additions & 1 deletion process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading