id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3531,initial_path is not thread-safe,Andrey Semashev,Beman Dawes,"The initial_path template function uses function-local static variable and thus is not thread-safe. The documentation states the recommendadion to call initial_path from the beginning of the main function. However, following it is not sufficient because: 1. If the application consists of several modules (dll or so), on many architectures each module will contain its own copy of the static variable defined in initial_path. Each copy will be initialized as needed, when initial_path is called from within the corresponding module. 2. The threads may already be running when initial_path is called. This may be true regardless of whether initial_path is called from main or some another place in a dll. What makes the problem worse is that there are two such functions, actually: initial_path< path >() and initial_path< wpath >(). Each of them will have the described problem. ",Bugs,reopened,Boost 1.41.0,filesystem,Boost 1.40.0,Problem,,initial_path,raad@…