coolfluid/coolfluid3 — Issue #158: Memory problem related to lexical_cast from UUID
Author: wdeconinck
Created: 2011-11-17 17:38:26+00:00
State: open

ValGrind reports a problem with the line:
`m_properties.add_property("uuid", boost::lexical_cast(boost::uuids::random_generator()()));`

in Component.cpp constructor

```
==68480== Conditional jump or move depends on uninitialised value(s)
==68480== at 0x4D4644C: int std::__int_to_char(char*, unsigned long, char const*, std::_Ios_Fmtflags, bool) (in /usr/lib/libstdc++.6.0.9.dylib)
==68480== by 0x4D4D0E0: std::ostreambuf_iterator > std::num_put > >::_M_insert_int(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib/libstdc++.6.0.9.dylib)
==68480== by 0x4D4D298: std::num_put > >::do_put(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib/libstdc++.6.0.9.dylib)
==68480== by 0x4D540E9: std::ostream& std::ostream::_M_insert(unsigned long) (in /usr/lib/libstdc++.6.0.9.dylib)
==68480== by 0x39EBA9E: std::basic_ostream >& boost::uuids::operator<< >(std::basic_ostream >&, boost::uuids::uuid const&) (/Users/willem/workspace/coolfluid3/deps/clang/include/boost/uuid/uuid_io.hpp:55)
==68480== by 0x39EABCC: boost::detail::lexical_stream >::operator<<(boost::uuids::uuid const&) (/Users/willem/workspace/coolfluid3/deps/clang/include/boost/lexical_cast.hpp:595)
==68480== by 0x39EAA1C: std::string boost::detail::lexical_cast(boost::call_traits::param_type, char*, unsigned long) (/Users/willem/workspace/coolfluid3/deps/clang/include/boost/lexical_cast.hpp:1151)
==68480== by 0x39C0A83: std::string boost::lexical_cast(boost::uuids::uuid const&) (/Users/willem/workspace/coolfluid3/deps/clang/include/boost/lexical_cast.hpp:1174)
==68480== by 0x39A90FB: cf3::common::Component::Component(std::string const&) (/Users/willem/workspace/coolfluid3/dev/kernel/cf3/common/Component.cpp:145)
==68480== by 0x3A1ED60: cf3::common::Environment::Environment(std::string const&) (/Users/willem/workspace/coolfluid3/dev/kernel/cf3/common/Environment.cpp:25)
==68480== by 0x39FF38E: cf3::common::AllocatedComponent::AllocatedComponent(std::string const&) (/Users/willem/workspace/coolfluid3/dev/kernel/cf3/common/AllocatedComponent.hpp:34)
==68480== by 0x39FF33C: cf3::common::AllocatedComponent::AllocatedComponent(std::string const&) (/Users/willem/workspace/coolfluid3/dev/kernel/cf3/common/AllocatedComponent.hpp:33)
==68480==
```