Running with Valgrind shows some errors:

==26292== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 0 from 0)
==26292==
==26292== 1 errors in context 1 of 3:
==26292== Syscall param stat(file_name) points to unaddressable byte(s)
==26292==    at 0x4ABBDD5: _xstat (xstat.c:35)
==26292==    by 0x40657F: stat (stat.h:455)
==26292==    by 0x40657F: access_check(char const*, int) (gcc.c:2725)
==26292==    by 0x406A6A: file_at_path(char*, void*) (gcc.c:2782)
==26292==    by 0x4069ED: file_at_path(char*, void*) (gcc.c:2762)
==26292==    by 0x405AF2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2550)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==  Address 0x4bcd905 is 0 bytes after a block of size 133 alloc'd
==26292==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26292==    by 0x471907: xmalloc (xmalloc.c:147)
==26292==    by 0x405DB2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2538)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==
==26292==
==26292== 1 errors in context 2 of 3:
==26292== Invalid write of size 1
==26292==    at 0x406A5B: file_at_path(char*, void*) (gcc.c:2781)
==26292==    by 0x4069ED: file_at_path(char*, void*) (gcc.c:2762)
==26292==    by 0x405AF2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2550)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==  Address 0x4bcd909 is 4 bytes after a block of size 133 alloc'd
==26292==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26292==    by 0x471907: xmalloc (xmalloc.c:147)
==26292==    by 0x405DB2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2538)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==
==26292==
==26292== 4 errors in context 3 of 3:
==26292== Invalid write of size 1
==26292==    at 0x483CA14: memmove (vg_replace_strmem.c:1270)
==26292==    by 0x406A28: file_at_path(char*, void*) (gcc.c:2769)
==26292==    by 0x4069ED: file_at_path(char*, void*) (gcc.c:2762)
==26292==    by 0x405AF2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2550)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==  Address 0x4bcd905 is 0 bytes after a block of size 133 alloc'd
==26292==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26292==    by 0x471907: xmalloc (xmalloc.c:147)
==26292==    by 0x405DB2: for_each_path(path_prefix const*, bool,
unsigned long, void* (*)(char*, void*), void*) (gcc.c:2538)
==26292==    by 0x407476: find_a_file(path_prefix const*, char const*,
int, bool) (gcc.c:2825)
==26292==    by 0x40E2C3: execute() (gcc.c:2973)
==26292==    by 0x412145: driver::do_spec_on_infiles() const (gcc.c:8236)
==26292==    by 0x404B3B: driver::main(int, char**) (gcc.c:7363)
==26292==    by 0x404DF3: main (gcc-main.c:46)
==26292==
==26292== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 0 from 0)

Attachment: valgrind.log.gz
Description: application/gzip



Reply via email to