id summary reporter owner description type status milestone component version severity resolution keywords cc 6817 Appending to an empty path segfaults... sean@… Beman Dawes "path::m_append_separator_if_needed() is not checking the bounds of its inputs and segfaults. Using clang 3.1 with c++0x, this crashes every time, whereas with previous versions this was somehow insulated from this segfault. Guarding against this with calls to empty() is possible, but seems excessively burdensome to check on every append operation. {{{ #!div style=""font-size: 100%"" Code highlighting: {{{#!c++ /* Compile instructions: clang++ -g -Wall -Wextra -pedantic -Wno-error -Wno-fatal-errors -pedantic-errors -fno-inline -std=c++0x -I/Users/sean/src/boost-prefix/include -Os -Wno-long-long -Wno-unused-parameter -Wsign-compare -stdlib=libc++ -L${HOME}/src/boost-prefix/lib -lboost_filesystem-mt -lboost_system-mt -o test_path test_path.cpp ./test_path */ #include ""boost/filesystem.hpp"" const std::string default_path = ""foo""; int main(int argc, char* argv[]) { boost::filesystem::path init_path; init_path /= default_path; std::cout << ""Path: "" << init_path << std::endl; return 0; } }}} }}} {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xffffffffffffffe8 0x000000010000db50 in boost::filesystem3::path::m_append_separator_if_needed () (gdb) bt #0 0x000000010000db50 in boost::filesystem3::path::m_append_separator_if_needed () #1 0x00000001000015dd in boost::filesystem3::path::append, std::__1::allocator > > (this=0x7fff5fbff4e0, source=@0x100002288, cvt=) at path.hpp:679 #2 0x0000000100000f6e in main (argc=1606415584, argv=0x100002288) at test_path.cpp:249 }}}" Bugs closed To Be Determined filesystem Boost 1.49.0 Regression invalid filesystem append