aboutsummaryrefslogtreecommitdiff
path: root/htl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-06-20 20:55:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-06-20 20:55:10 +0200
commitdd144dce21c864781fade4561581d50fb4549956 (patch)
tree305692b82489abb4fcb4d69f9310714960e2d18b /htl
parentb375e597da3139b40f7c0ba959a6800f5b8971d5 (diff)
downloadglibc-dd144dce21c864781fade4561581d50fb4549956.zip
glibc-dd144dce21c864781fade4561581d50fb4549956.tar.gz
glibc-dd144dce21c864781fade4561581d50fb4549956.tar.bz2
malloc: Replace shell/Perl gate in mtrace
The previous version expanded $0 and $@ twice. The new version defines a q no-op shell command. The Perl syntax error is masked by the eval Perl function. The q { … } construct is executed by the shell without errors because the q shell function was defined, but treated as a non-expanding quoted string by Perl, effectively hiding its context from the Perl interpreter. As before the script is read by require instead of executed directly, to avoid infinite recursion because the #! line contains /bin/sh. Introduce the “fatal” function to produce diagnostics that are not suppressed by “do”. Use “do” instead of “require” because it has fewer requirements on the executed script than “require”. Prefix relative paths with './' because “do” (and “require“ before) searches for the script in @INC if the path is relative and does not start with './'. Use $_ to make the trampoline shorter. Add an Emacs mode marker to indentify the script as a Perl script.
Diffstat (limited to 'htl')
0 files changed, 0 insertions, 0 deletions