Opened 8 years ago
Last modified 5 years ago
#10233 assigned Bugs
create_directories causes invalid read
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.50.0 | Severity: | Problem |
Keywords: | create_directories | Cc: |
Description
The following code, when run under Valgrind, will report two instances of invalid reads during program close (after main).
Tested on Ubuntu Linux x64 12.04 (kernel 3.8.0) with gcc 4.6.3.
#include <stdlib.h> #include <boost/filesystem.hpp> int main() { system("rm -rf /tmp/test"); // make sure directory doesn't already exist boost::filesystem::create_directories("/tmp/test"); return 0; }
Change History (3)
comment:1 by , 8 years ago
Status: | new → assigned |
---|
comment:2 by , 8 years ago
- put source in bbug.cpp
- export BOOST_PATH=<...>
- g++ bbug.cpp -I$BOOST_PATH/include -L$BOOST_PATH/lib -lboost_system -lboost_filesystem -Wl,-rpath=$BOOST_PATH/lib
- valgrind ./a.out
comment:3 by , 5 years ago
I have run the above code but did not get any invalid reads using valgrind so can you please elaborate on the bug ?
Note:
See TracTickets
for help on using tickets.
Using gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 on Ubuntu 14.4 LTS, I was not able to reproduce the problem.
What were the gcc and valgrind command lines you used?
--Beman