mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-12 06:11:37 +00:00
rev 12001 has introduced a regression in VG_(env_remove_valgrind_env_stuff): to avoid modifying a possibly read-only env string, the string is duplicated, and the copy is modified. However, mash_env_column modifies the string "in-place". The modified string was not put back in the env (and could not, because the src string is only partially copied). This means that the valgrind preload strings were not cleaned up and when a 32 bit executable execs a 64 bits (or vice versa: 64 bit execs 32 bits), LD_PRELOAD contains both the 32 bits and 64 bits versions of Valgrind vgpreload.... => ld.so then gives an error msg, as it can't preload either the 32 or the 64 bits version. The patch fixes this by duplicating the whole env string, and passing to mash_colon_env a pointer to the correct offset in the whole env string. The duplicated string is replacing the original entry in envp. This patch adds two regression tests : none/tests/allexec32 and none/tests/allexec64. On a bi-arch valgrind, these will be 32bits and 64 bits executables, exec-ing each other. On a single arch, one will be a symlink to the other (to avoid different .exp files, and still test exec). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12287
53 lines
1.5 KiB
Makefile
53 lines
1.5 KiB
Makefile
|
|
include $(top_srcdir)/Makefile.tool-tests.am
|
|
|
|
dist_noinst_SCRIPTS = filter_stderr
|
|
|
|
EXTRA_DIST = \
|
|
neon128.stdout.exp neon128.stderr.exp neon128.vgtest \
|
|
neon64.stdout.exp neon64.stderr.exp neon64.vgtest \
|
|
v6intARM.stdout.exp v6intARM.stderr.exp v6intARM.vgtest \
|
|
v6intThumb.stdout.exp v6intThumb.stderr.exp v6intThumb.vgtest \
|
|
v6media.stdout.exp v6media.stderr.exp v6media.vgtest \
|
|
vfp.stdout.exp vfp.stderr.exp vfp.vgtest
|
|
|
|
check_PROGRAMS = \
|
|
allexec \
|
|
neon128 \
|
|
neon64 \
|
|
v6intARM \
|
|
v6intThumb \
|
|
v6media \
|
|
vfp
|
|
|
|
AM_CFLAGS += @FLAG_M32@
|
|
AM_CXXFLAGS += @FLAG_M32@
|
|
AM_CCASFLAGS += @FLAG_M32@
|
|
|
|
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
|
|
|
|
# These two are specific to their ARM/Thumb respectively and so we
|
|
# hardwire -marm/-mthumb. neon64 and neon128 are compilable on both,
|
|
# however, ask for them to be compiled on thumb, as that looks
|
|
# like that's going to be the more common use case. They also
|
|
# need special helping w.r.t -mfpu and -mfloat-abi, though.
|
|
# Also force -O0 since -O takes hundreds of MB of memory
|
|
# for v6intThumb.c.
|
|
v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
|
|
v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
|
|
|
|
v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
|
|
|
|
vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
|
|
-mfpu=neon -mfloat-abi=softfp \
|
|
-mthumb
|
|
|
|
|
|
neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
|
|
-mfpu=neon -mfloat-abi=softfp \
|
|
-mthumb
|
|
|
|
neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
|
|
-mfpu=neon -mfloat-abi=softfp \
|
|
-mthumb
|