[Boost-bugs] [Boost C++ Libraries] #2782: boost::program_options::notify crashes when variables_map contains user inserted values

Subject: [Boost-bugs] [Boost C++ Libraries] #2782: boost::program_options::notify crashes when variables_map contains user inserted values
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-02-20 09:26:30


#2782: boost::program_options::notify crashes when variables_map contains user
inserted values
------------------------------+---------------------------------------------
 Reporter: boost_at_[hidden] | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: None
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 variables_map is useful as a generic properties map (esp. due to its
 various parsers). But when variables_map contains user inserted values (a
 properties map would support adding/setting values. variables_map does
 allow base std::map::insert being called), notify would crash/segfault/die
 due to m_value_semantic being null (empty shared_ptr).

 I suggest that a simple check be added to the notify function before
 calling (*it).second.m_value_semantic->notify()

 This would make it a lot more convenient for those who build a properties
 wrapper around program_options. Thanks.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2782>
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:59 UTC