mirror of
https://github.com/mirror/make.git
synced 2026-08-31 03:38:03 +08:00
Clean up memory leak warnings from ASAN and Valgrind
* src/main.c (main): Add "sanitize" to .FEATURES if ASAN is enabled. * src/expand.c (expand_variable_output): Remember "recursive" setting in case it's changed by the expansion of the variable. * src/file.c (rehash_file): If we drop a file from the global 'files' hash, remember it in rehashed_files. We can't free it because it's still being referenced (callers will invoke check_renamed()) but it will be a leak since it's no longer referenced by 'files'. * src/remake.c (update_file_1): If we drop a dependency, remember it in dropped_list. We can't free it because it's still being referenced by callers but it will be a leak since it's no longer referenced as a prerequisite. * tests/scripts/functions/guile: Don't run Guile tests when ASAN is enabled. * tests/scripts/functions/wildcard: Enabling ASAN causes glob(3) to break! Don't run this test. * tests/scripts/features/exec: Valgrind's exec() doesn't support scripts with no shbang. * tests/scripts/jobserver: Valgrind fails if TMPDIR is set to an invalid directory: skip those tests. * tests/scripts/features/output-sync: Ditto. * tests/scripts/features/temp_stdin: Ditto.
This commit is contained in:
@@ -15,7 +15,11 @@ my $details = "The various shells that this test uses are the default"
|
||||
$port_type eq 'UNIX' or return -1;
|
||||
$^O =~ /cygwin/ and return -1;
|
||||
|
||||
my @shbangs = ('', '#!/bin/sh', "#!$perl_name");
|
||||
my @shbangs = ('#!/bin/sh', "#!$perl_name");
|
||||
|
||||
# The exec in Valgrind's VM doesn't allow starting commands without any shbang
|
||||
$valgrind or push @shbangs, '';
|
||||
|
||||
my @shells = ('', 'SHELL=/bin/sh');
|
||||
|
||||
# Try whatever shell the user has, as long as it's not a C shell.
|
||||
|
||||
Reference in New Issue
Block a user