Package: kcachegrind
Version: 4:25.04.0-1
Severity: normal

To reproduce (the touch command creates a .txt file with an iso-8859-1
encoded name on a system set to UTF-8):

$ mkdir kcachegrind-tmp
$ valgrind --tool=cachegrind echo test
==3132878== Cachegrind, a high-precision tracing profiler
==3132878== Copyright (C) 2002-2024, and GNU GPL'd, by Nicholas Nethercote et 
al.
==3132878== Using Valgrind-3.25.1 and LibVEX; rerun with -h for copyright info
==3132878== Command: echo test
==3132878== 
test
==3132878== 
==3132878== I refs:        436,924
$ touch `perl -e 'printf "%c.txt", 246'`
$ kcachegrind cachegrind.out.*

Kcachegrind fails to load the cachegrind output, popping up error
dialog (the PID in the filename will vary):

  Could not open the file "cachegrind.out.3132878". Check it exists and
  you have enough permissions to read it.

If the text file is removed then kcachegrind loads the cachegrind output
successfully.  Further testing suggests the two files need to be in the
same directory to trigger the problem (rather than it being the presence
of the .txt file in the current directory)

One problem is that the error message is misleading since
"cachegrind.out.3132878" can be opened and read.

I'd also completely understand if kcachegrind didn't support reading a
"cachegrind.out" file with an invalidly encoded name (though ideally
with a clear error message), but it seems surprising that the mere
presence of another file in the same directory matters.  Kcachegrind
really shouldn't be looking at arbitrary files in the current directory.

This is a somewhat obscure case, but it's not just a theoretical
concern.  I had an invalidly encoded file from previous testing that
such files were handled gracefully by the program I was running
cachegrind on as such files are sometimes encountered when handling data
from other systems.

(#911931 is the same error message, but the trigger there seems to be a
1MB command line, so that seems like an unrelated problem.)

Cheers,
    Olly

-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.18.10+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_NZ:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages kcachegrind depends on:
ii  kio6                  6.23.0-2
ii  libc6                 2.42-13
ii  libkf6archive6        6.23.0-1
ii  libkf6configcore6     6.23.0-2
ii  libkf6configgui6      6.23.0-2
ii  libkf6configwidgets6  6.23.0-1
ii  libkf6coreaddons6     6.23.0-1
ii  libkf6dbusaddons6     6.23.0-1
ii  libkf6i18n6           6.23.0-2
ii  libkf6kiocore6        6.23.0-2
ii  libkf6widgetsaddons6  6.23.0-1
ii  libkf6xmlgui6         6.23.0-1
ii  libqt6core6t64        6.9.2+dfsg-4+b1
ii  libqt6dbus6           6.9.2+dfsg-4+b1
ii  libqt6gui6            6.9.2+dfsg-4+b1
ii  libqt6widgets6        6.9.2+dfsg-4+b1
ii  libstdc++6            15.2.0-14

Versions of packages kcachegrind recommends:
ii  graphviz  14.1.2-1
ii  valgrind  1:3.25.1-3

Versions of packages kcachegrind suggests:
pn  kcachegrind-converters  <none>
pn  khelpcenter             <none>

-- no debconf information

Reply via email to