Created attachment 159185 [details] Patch workarounding the issue (ie remove "use strict;") SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Just run `callgrind_control --help` with valgrind 3.21, you will see it cannot run because of some perl errors. Errors are of two types: - Global symbol "$c" requires explicit package name at ./callgrind_control line 502. - Bareword "getCallgrindPids" not allowed while "strict subs" in use at ./callgrind_control line 220. OBSERVED RESULT Perl errors. EXPECTED RESULT No perl errors. SOFTWARE/OS VERSIONS Tried on SLES 12 and RHEL 9. ADDITIONAL INFORMATION I add this this bug report a git commit which workarounds (ie remove "use strict;", not fix the actual errors) this issue. I hardly know anything about perl ;) A better long term fix would be to actually fix these perl errors.
> ADDITIONAL INFORMATION > I add this this bug report a git commit which workarounds (ie remove "use > strict;", not fix the actual errors) this issue. I hardly know anything > about perl ;) A better long term fix would be to actually fix these perl > errors. I'm equally bad at perl, but it looks like it just wants all variables to be properly declared with "my". Hope to have a fix ready soon.
Urgh, that is my fault: commit 6fc239ed47b44b82fb14849159f5b22132b6ca94 Author: Mark Wielaard <mark@klomp.org> Date: Fri Apr 21 18:13:14 2023 +0200 Add use strict and use warnings to perl callgrind scripts This way we can simply use #! /usr/bin/env perl and don't need env -S and perl -w flags which might confuse some packaging utilities. But I clearly never tested callgrind_control and it also doesnt seem to have any tests (callgrind_annotate, the other perl script does have two tests callgrind/tests/ann{1,2}.vgtest). I quickly tested by hand and simply removing use strict seems to make everything work as expected. So unless it is really easy to make the perl script "strict" I would recommend going with simply removing the use strict;
Created attachment 159364 [details] More complete patch Only tested with callgrind_control -help
Perhaps we should add some tests as well.
The patch needs a bit more work. I've fixed one problem, but the -e option doesn't seem to be working.
(In reply to Paul Floyd from comment #5) > The patch needs a bit more work. I've fixed one problem, but the -e option > doesn't seem to be working. Have mostly fixed -e but still getting two Ir columns.
Created attachment 159540 [details] Full patch with a few fixes There were a few bugs like variables not being reinitialized.
commit 3df8a00a4ed7dbe436f28d8b3db72e679eb1b427 (origin/master, origin/HEAD, master) Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Fri Jun 9 13:17:58 2023 +0200 470121 - Can't run callgrind_control with valgrind 3.21.0 because of perl errors