| Summary: | Can't run callgrind_control with valgrind 3.21.0 because of perl errors | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Romain Geissler <romain.geissler> |
| Component: | callgrind | Assignee: | Paul Floyd <pjfloyd> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mark, pjfloyd |
| Priority: | NOR | ||
| Version First Reported In: | 3.21.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Patch workarounding the issue (ie remove "use strict;")
More complete patch Full patch with a few fixes |
||
|
Description
Romain Geissler
2023-05-22 11:48:44 UTC
> 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 |