Skip to content

Invalid memory access in fs::list_dir #712

Closed
@brson

Description

@brson

Under valgrind fs::list_dir(".") says

==16608== Invalid read of size 4
==16608==    at 0x495C205: os_fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so)
==16608==    by 0x495F038: fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so)
==16608==    by 0x8049503: test_list_dir (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0x80495AB: _rust_main (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0x8049ACB: _rust_main_wrap (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0xDEADBEEE: ???
==16608==  Address 0x72180b0 is 0 bytes after a block of size 16 alloc'd
==16608==    at 0x48DD876: malloc (vg_replace_malloc.c:236)
==16608==    by 0x48FDFDC: rust_srv::malloc(unsigned int) (rust_srv.cpp:17)
==16608==    by 0x49010B9: memory_region::malloc(unsigned int) (memory_region.cpp:97)
==16608==    by 0x48F6338: rust_task::malloc(unsigned int, type_desc*) (rust_task.cpp:338)
==16608==    by 0x48F3221: rust_list_files_ivec (rust_builtin.cpp:612)
==16608==    by 0x4923BE6: _ZN5os_fs6rustrtE73 (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so)
==16608==    by 0x495BBFE: os_fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so)
==16608==    by 0x495F038: fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so)
==16608==    by 0x8049503: test_list_dir (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0x80495AB: _rust_main (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0x8049ACB: _rust_main_wrap (in /home/banderson/Dev/rust/build/test/run-pass/lib-fs.stage1)
==16608==    by 0xDEADBEEE: ???

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions