# This file contains the valgrind errors to be suppressed for casacore.

# Very often libc gives an invalid free error at exit.
{
   Ubuntu-gcc-freeres-error-in-libc
   Memcheck:Free
   fun:free
   obj:/lib/libc-2.11.1.so
   obj:/lib/libc-2.11.1.so
   fun:_vgnU_freeres
}

# putenv takes over the pointer, but valgrind does not notice.
{
   Class-EnvVar-putenv-takes-over-pointer
   Memcheck:Leak
   fun:_Znam
   fun:_ZN4casa19EnvironmentVariable3setERKNS_6StringES3_
}

# Casacore's IO sometimes uses uninitialized fill characters.
{
   Casacore-write-not-fully-initialized-buffer-LargeFilebufIO
   Memcheck:Param
   write(buf)
   fun:__write_nocancel
   fun:_ZN4casa9FiledesIO5writeExPKv
}
{
   Casacore-write-not-fully-initialized-buffer-FilebufIO
   Memcheck:Param
   write(buf)
   fun:__write_nocancel
   fun:_ZN4casa9FilebufIO11writeBufferExPKcx
}

# The function strlen is optimized by testing multiple byte simultaneously.
# This gives an uninitialized condition error for the bytes beyond the end.
{
   Optimized-strlen-uses-multiple-bytes
   Memcheck:Cond
   fun:__GI_strlen
   fun:_ZNSsC1EPKcRKSaIcE
}
{
   Optimized-strlen-uses-multiple-bytes-2
   Memcheck:Cond
   fun:strlen
   fun:_ZNSsC1EPKcRKSaIcE
}

# On lhd002 the nss functions (called by getpwnam) leak
{
   getpwnam-nss-leak
   Memcheck:Leak
   fun:malloc
   fun:nss_parse_service-list
   fun:__nss_database_lookup
}

