From 15c0c5719fe4d14190c96d155cfe4ad5dd883b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ko=C5=84czak?= Date: Mon, 23 Aug 2021 12:35:05 +0200 Subject: [PATCH] fixing regex to quotemeta the function name --- stackcollapse-perf.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackcollapse-perf.pl b/stackcollapse-perf.pl index f772f5eb..fd3c78e2 100755 --- a/stackcollapse-perf.pl +++ b/stackcollapse-perf.pl @@ -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);