Opened 8 years ago

Last modified 5 years ago

#10233 assigned Bugs

create_directories causes invalid read

Reported by: Itay C <itay.chamiel@…> 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 Beman Dawes, 8 years ago

Status: newassigned

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

comment:2 by Itay C <itay.chamiel@…>, 8 years ago

  1. put source in bbug.cpp
  2. export BOOST_PATH=<...>
  3. g++ bbug.cpp -I$BOOST_PATH/include -L$BOOST_PATH/lib -lboost_system -lboost_filesystem -Wl,-rpath=$BOOST_PATH/lib
  4. valgrind ./a.out

comment:3 by harisaicharan111.challa@…, 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.