The script finds the executable in the output from the proc.communicate() command.
An example would be:
# WT_TEST/test_practice.0/dump_python3.16562.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), # SVR4-style, from 'python3 /home/ubuntu/wiredtiger/test/suite/run.py -j 1 -p test_practice', # real uid: 1000, effective uid: 1000, real gid: 1000, effective gid: 1000, execfn: '/usr/bin/python3', platform: 'x86_64'
Currently, the script relies on the execfn function. However, it appears that this field may be missing sometimes. For example, this is a possible output:
(b"./dump_t.11604.core: ELF 64-bit LSB core file, x86-64, version 1 (SYSV), SVR4-style, from './t'\n", None)
In both cases, the field from is there, we could try to use it as a fallback.