Opened 10 years ago

Last modified 10 years ago

#8345 new Bugs

0 bytes after a block of size 8 alloc'd

Reported by: rjgebis@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.53.0 Severity: Problem
Keywords: filesystem has_extension invalid read Cc:

Description

I was just profiling my appication build with 1.53.0 using valgrind 3.8.1 and have this errors

This was build on Ubuntu 12.10 server x64

Here is the source code

std::string storePathStr; Set from arg list boost::filesystem::path storePath;

if( storePathStr.empty() )

storePath /= "./store/"; (boost::filesystem::current_path());

else {

if( storePathStr[storePathStr.size()-1] != PATH_SEPERATOR )

storePathStr.append(1, PATH_SEPERATOR);

storePath = boost::filesystem::path(storePathStr);

}

if( storePath.has_extension() )

THROW_APP_EXCEPTION("Invalid Store Path: " + storePath.string());

Here is stack

operator new[](unsigned long) std::moneypunct<wchar_t, false>::_M_initialize_moneypunct(locale_struct*, char const*) std::locale::_Impl::_Impl(char const*, unsigned long) std::locale::locale(char const*) boost::filesystem::path::codecvt() boost::filesystem::path::begin() boost::filesystem::path::compare(boost::filesystem::path const&) const boost::filesystem::path::extension() boost::filesystem::path::has_extension()

Change History (1)

comment:1 by rjgebis@…, 10 years ago

there is missing call before .has_extansion() in first post

storePath = storePath.make_preferred();

if( storePath.has_extension() )

THROW_APP_EXCEPTION("Invalid Store Path: " + storePath.string());

Note: See TracTickets for help on using tickets.