[Tcsh] Patch to enable building tcsh with ASAN enabled

Gregory Nisbet gregorynisbet at google.com
Mon Nov 13 19:08:25 UTC 2023

Hello all,

I tried building tcsh with ASAN enabled (`-fsanitize=address` in the
CFLAGS and LDFLAGS) last week. It caught an intentional memory leak in

The simplest way I could think of to resolve the problem is to add a
function with malloc's API that creates a global linked list of
strings and cleans it up when the program terminates.

That change is here on github:
https://github.com/tcsh-org/tcsh/pull/81 . I would appreciate it if
someone could take a look and provide me with feedback.

FWIW, I tried compiling tcsh with ASAN enabled and using it a little
bit to see if I could trigger a memory access violation via normal use
in the shell itself, but haven't succeeded yet.


More information about the Tcsh mailing list