[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 139448] New: Segmentation fault and possible false positive
From:       Javeed Shaikh <syscrash2k () gmail ! com>
Date:       2006-12-31 15:18:47
Message-ID: 20061231161843.139448.syscrash2k () gmail ! com
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=139448         
           Summary: Segmentation fault and possible false positive
           Product: valgrind
           Version: 3.2.1
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: jseward acm org
        ReportedBy: syscrash2k gmail com


Version:           3.2.1 (using KDE KDE 3.5.5)
Compiler:          gcc (GCC) 4.1.2 20061215 (prerelease) 
OS:                Linux

Valgrind crashes when running the binary produced from the attached source code (use \
build.sh to compile) with a segmentation fault. Complete output of `valgrind -v \
./test`:





==11125== Memcheck, a memory error detector.
==11125== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==11125== Using LibVEX rev 1658, a library for dynamic binary translation.
==11125== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==11125== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==11125== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==11125== 
--11125-- Command line
--11125--    ./test
--11125-- Startup, with flags:
--11125--    -v
--11125-- Contents of /proc/version:
--11125--   Linux version 2.6.17.7 (root epsilon) (gcc version 4.1.1) #2 Thu Oct 5 \
                20:30:40 EDT 2006
--11125-- Arch and hwcaps: X86, x86-sse1-sse2
--11125-- Valgrind library directory: /usr/lib/valgrind
--11125-- Reading syms from /lib/ld-2.5.so (0x4000000)
--11125-- Reading syms from /home/syscrash/.tmp/kvcfg/new_test/test (0x8048000)
--11125-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
--11125--    object doesn't have a dynamic symbol table
--11125-- Reading suppressions file: /usr/lib/valgrind/default.supp
--11125-- REDIR: 0x4014C90 (index) redirected to 0x38028183 \
                (vgPlain_x86_linux_REDIR_FOR_index)
--11125-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401D000)
--11125-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so \
(0x401F000) ==11125== WARNING: new redirection conflicts with existing -- ignoring it
--11125--     new: 0x04014C90 (index     ) R-> 0x04022050 index
--11125-- REDIR: 0x4014E30 (strlen) redirected to 0x4022220 (strlen)
--11125-- Reading syms from /lib/libc-2.5.so (0x403E000)
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A889: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A891: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400AD59: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A9D4: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400B161: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A889: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A891: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A9D4: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
--11125-- REDIR: 0x40A8680 (rindex) redirected to 0x4021F30 (rindex)
--11125-- REDIR: 0x40A5550 (malloc) redirected to 0x4021306 (malloc)
--11125-- REDIR: 0x40A9000 (memchr) redirected to 0x40223F0 (memchr)
--11125-- REDIR: 0x40A99A0 (memcpy) redirected to 0x4022BE0 (memcpy)
--11125-- REDIR: 0x40A5980 (realloc) redirected to 0x40213B5 (realloc)
--11125-- REDIR: 0x40A7A40 (strcat) redirected to 0x40225E0 (strcat)
--11125-- REDIR: 0x40A3110 (free) redirected to 0x4020F20 (free)
--11125-- REDIR: 0x40A85D0 (strncpy) redirected to 0x4022D70 (strncpy)
--11125-- REDIR: 0x40A7D60 (strcmp) redirected to 0x40222D0 (strcmp)
--11125-- REDIR: 0x40A82C0 (strlen) redirected to 0x4022200 (strlen)
allocated space for pice
==11125== 
==11125== Invalid write of size 4
==11125==    at 0x80491D9: keyval_pair_get_list_string (keyvalcfg.c:388)
==11125==    by 0x804877F: main (test.c:21)
==11125==  Address 0x4169530 is 0 bytes inside a block of size 1 alloc'd
==11125==    at 0x402138B: malloc (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4021415: realloc \
(in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x80491C4: \
keyval_pair_get_list_string (keyvalcfg.c:387) ==11125==    by 0x804877F: main \
(test.c:21) allocated space for l3ib
allocated space for androo yats
==11125== 
==11125== Invalid read of size 4
==11125==    at 0x8048794: main (test.c:26)
==11125==  Address 0x4169618 is 0 bytes inside a block of size 3 alloc'd
==11125==    at 0x4021487: realloc (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x80491C4: \
keyval_pair_get_list_string (keyvalcfg.c:387) ==11125==    by 0x804877F: main \
(test.c:21) ==11125== 
==11125== Use of uninitialised value of size 4
==11125==    at 0x4022208: strlen (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4094C64: puts \
(in /lib/libc-2.5.so) ==11125==    by 0x804879D: main (test.c:26)
==11125== 
==11125== Invalid read of size 1
==11125==    at 0x4022208: strlen (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4094C64: puts \
(in /lib/libc-2.5.so) ==11125==    by 0x804879D: main (test.c:26)
==11125==  Address 0xF8 is not stack'd, malloc'd or (recently) free'd
==11125== 
==11125== Process terminating with default action of signal 11 (SIGSEGV)
==11125==  Access not within mapped region at address 0xF8
==11125==    at 0x4022208: strlen (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4094C64: puts \
(in /lib/libc-2.5.so) ==11125==    by 0x804879D: main (test.c:26)
--11125-- REDIR: 0x40A9500 (memset) redirected to 0x40224F0 (memset)
==11125== 
==11125== ERROR SUMMARY: 19 errors from 12 contexts (suppressed: 0 from 0)
==11125== 
==11125== 1 errors in context 1 of 12:
==11125== Invalid read of size 1
==11125==    at 0x4022208: strlen (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4094C64: puts \
(in /lib/libc-2.5.so) ==11125==    by 0x804879D: main (test.c:26)
==11125==  Address 0xF8 is not stack'd, malloc'd or (recently) free'd
==11125== 
==11125== 1 errors in context 2 of 12:
==11125== Use of uninitialised value of size 4
==11125==    at 0x4022208: strlen (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4094C64: puts \
(in /lib/libc-2.5.so) ==11125==    by 0x804879D: main (test.c:26)
==11125== 
==11125== 1 errors in context 3 of 12:
==11125== Invalid read of size 4
==11125==    at 0x8048794: main (test.c:26)
==11125==  Address 0x4169618 is 0 bytes inside a block of size 3 alloc'd
==11125==    at 0x4021487: realloc (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x80491C4: \
keyval_pair_get_list_string (keyvalcfg.c:387) ==11125==    by 0x804877F: main \
(test.c:21) ==11125== 
==11125== 1 errors in context 4 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A9D4: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 1 errors in context 5 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A891: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 1 errors in context 6 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A889: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003D64: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 1 errors in context 7 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A891: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 1 errors in context 8 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A889: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 2 errors in context 9 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400A9D4: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 2 errors in context 10 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400B161: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== 
==11125== 3 errors in context 11 of 12:
==11125== Invalid write of size 4
==11125==    at 0x80491D9: keyval_pair_get_list_string (keyvalcfg.c:388)
==11125==    by 0x804877F: main (test.c:21)
==11125==  Address 0x4169530 is 0 bytes inside a block of size 1 alloc'd
==11125==    at 0x402138B: malloc (in \
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x4021415: realloc \
(in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==11125==    by 0x80491C4: \
keyval_pair_get_list_string (keyvalcfg.c:387) ==11125==    by 0x804877F: main \
(test.c:21) ==11125== 
==11125== 4 errors in context 12 of 12:
==11125== Conditional jump or move depends on uninitialised value(s)
==11125==    at 0x400AD59: _dl_relocate_object (in /lib/ld-2.5.so)
==11125==    by 0x4003EC7: dl_main (in /lib/ld-2.5.so)
==11125==    by 0x40135C5: _dl_sysdep_start (in /lib/ld-2.5.so)
==11125==    by 0x40011E1: _dl_start (in /lib/ld-2.5.so)
==11125==    by 0x4000846: (within /lib/ld-2.5.so)
==11125== IN SUMMARY: 19 errors from 12 contexts (suppressed: 0 from 0)
==11125== 
==11125== malloc/free: in use at exit: 92 bytes in 8 blocks.
==11125== malloc/free: 14 allocs, 6 frees, 1,000 bytes allocated.
==11125== 
==11125== searching for pointers to 8 not-freed blocks.
==11125== checked 52,864 bytes.
==11125== 
==11125== LEAK SUMMARY:
==11125==    definitely lost: 22 bytes in 3 blocks.
==11125==      possibly lost: 0 bytes in 0 blocks.
==11125==    still reachable: 70 bytes in 5 blocks.
==11125==         suppressed: 0 bytes in 0 blocks.
==11125== Use --leak-check=full to see details of leaked memory.
--11125--  memcheck: sanity checks: 0 cheap, 1 expensive
--11125--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--11125--  memcheck: auxmaps: 0 searches, 0 comparisons
--11125--  memcheck: SMs: n_issued      = 9 (144k, 0M)
--11125--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--11125--  memcheck: SMs: max_noaccess  = 65535 (1048560k, 1023M)
--11125--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--11125--  memcheck: SMs: max_defined   = 20 (320k, 0M)
--11125--  memcheck: SMs: max_non_DSM   = 9 (144k, 0M)
--11125--  memcheck: max sec V bit nodes:    0 (0k, 0M)
--11125--  memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--11125--  memcheck: max shadow mem size:   448k, 0M
--11125-- translate:            fast SP updates identified: 1,912 ( 89.1%)
--11125-- translate:   generic_known SP updates identified: 129 (  6.0%)
--11125-- translate: generic_unknown SP updates identified: 104 (  4.8%)
--11125--     tt/tc: 4,209 tt lookups requiring 4,273 probes
--11125--     tt/tc: 4,209 fast-cache updates, 3 flushes
--11125--  transtab: new        1,991 (41,407 -> 698,902; ratio 168:10) [0 scs]
--11125--  transtab: dumped     0 (0 -> ??)
--11125--  transtab: discarded  6 (146 -> ??)
--11125-- scheduler: 33,673 jumps (bb entries).
--11125-- scheduler: 0/2,282 major/minor sched events.
--11125--    sanity: 1 cheap, 1 expensive checks.
--11125--    exectx: 30,011 lists, 24 contexts (avg 0 per list)
--11125--    exectx: 37 searches, 13 full compares (351 per 1000)
--11125--    exectx: 0 cmp2, 52 cmp4, 0 cmpAll
zsh: segmentation fault  valgrind -v ./test




The program (./test) does not produce a segmentation fault when run normally. In \
addition, I do not think that it is leaking memory, at least not at the place where \
valgrind claims it is.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic