Subject: Re: [Boost-bugs] [Boost C++ Libraries] #662: [filesystem] portable_posix_name() may fail on premain call
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-26 21:40:50
#662: [filesystem] portable_posix_name() may fail on premain call
---------------------+------------------------------------------------------
Reporter: kbluck | Owner: bemandawes
Type: Bugs | Status: closed
Milestone: | Component: filesystem
Version: None | Severity: Showstopper
Resolution: fixed | Keywords:
---------------------+------------------------------------------------------
Changes (by bemandawes):
* status: new => closed
* resolution: None => fixed
Old description:
> {{{
> Boost 1.33.1
>
> The constant valid_posix defined in
> path_posix_windows.cpp is a module-level static
> definition. This means that instances of path also
> defined at some other module scope may fail when
> checking against portable_posix_name due to
> initialization-order problems; valid_posix may not yet
> be initialized at the time it is referenced.
>
> This can be avoided by wrapping valid_posix and similar
> static constants in functions as function statics,
> which guarantees initialization order.
>
> }}}
New description:
{{{
Boost 1.33.1
The constant valid_posix defined in
path_posix_windows.cpp is a module-level static
definition. This means that instances of path also
defined at some other module scope may fail when
checking against portable_posix_name due to
initialization-order problems; valid_posix may not yet
be initialized at the time it is referenced.
This can be avoided by wrapping valid_posix and similar
static constants in functions as function statics,
which guarantees initialization order.
}}}
Comment:
1.34.0 and later code no longer contains this or any other problem
statics.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/662#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC