Skip to content

Commit

Permalink
datadog_cov native extension - attempt to fix per test code coverage …
Browse files Browse the repository at this point in the history
…crashes by making sure that filename is a T_STRING when processing instantiated classes in allocation profiler
  • Loading branch information
anmarchenko committed Aug 27, 2024
1 parent af3db96 commit 8bf0458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/datadog_cov/datadog_cov.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static int process_instantiated_klass(st_data_t key, st_data_t _value, st_data_t
}

VALUE filename = RARRAY_AREF(source_location, 0);
if (filename == Qnil)
if (filename == Qnil || !RB_TYPE_P(filename, T_STRING))
{
return ST_CONTINUE;
}
Expand Down

0 comments on commit 8bf0458

Please sign in to comment.