Rather than adjusting the way ldso allocates memory, for the

time being simply add a series of suppressions to make valgrind
ignore all memory mmaped by uClibc's ldso.
This commit is contained in:
Eric Andersen 2005-08-08 11:48:35 +00:00
parent 8ce4796efa
commit b904ce1778
3 changed files with 226 additions and 0 deletions

View File

@ -0,0 +1,212 @@
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_strdup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_malloc
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Cond
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_check_if_named_library_is_loaded
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_check_if_named_library_is_loaded
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_check_hashed_files
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_check_hashed_files
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_load_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_find_hash
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_find_hash
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_fixup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_fixup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_linux_resolve
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_linux_resolver
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_parse_lazy_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_parse_lazy_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_parse_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_parse_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc-0.9.27.so
fun:*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc-0.9.27.so
fun:*
}

View File

@ -65,6 +65,10 @@ $(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/none/vgskin_none.so
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(VALGRIND_DIR) install;
mv $(TARGET_DIR)/usr/bin/valgrind $(TARGET_DIR)/usr/bin/valgrind.bin
cp package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/
cp package/valgrind/valgrind.sh $(TARGET_DIR)/usr/bin/valgrind
chmod a+x $(TARGET_DIR)/usr/bin/valgrind
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
#mkdir -p $(TARGET_DIR)/etc/default
#cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind

10
package/valgrind/valgrind.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh -e
#
# Valgrind wrapper
# Use special suppression file for uClibc
export VALGRIND_OPTS="$VALGRIND_OPTS --suppressions=/usr/lib/valgrind/uclibc.supp"
# Use 'exec' to avoid having another shell process hanging around.
exec $0.bin "$@"