Skip to content

Commit

Permalink
fixing regex to quotemeta the function name
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-konczak-cs-put committed Aug 23, 2021
1 parent 6b3d9bf commit 15c0c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stackcollapse-perf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ sub inline {

$nmCache{$mod}=`nm $mod` unless defined $nmCache{$mod};

if ($nmCache{$mod} =~ /^([0-9a-f]+) . $func$/m) {
if ($nmCache{$mod} =~ /^([0-9a-f]+) . \Q$func\E$/m) {
my $base = hex $1;
my $newPc = sprintf "0x%x", $base+$addr;
my $result = inline($newPc, '', $mod);
Expand Down

0 comments on commit 15c0c57

Please sign in to comment.