segfault on parameter-less forensic logging
When configuring kea-dhcp[46] with a forensic logging without a "parameters" field, it segfaults.
"hooks-libraries": [
{
"library": "libdhcp_legal_log.so"
}
]
kea-dhcp6: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = isc::legal_log::BackendStore; typename boost::detail::sp_member_access<T>::type = isc::legal_log::BackendStore*]: Assertion 'px != 0' failed.
#4 0x00007ffff34e1cf5 in boost::shared_ptr<isc::legal_log::BackendStore>::operator-> (this=0x7ffff3558250 <isc::legal_log::BackendStore::instance()::backend_store>) at /usr/include/boo st/smart_ptr/shared_ptr.hpp:728 #5 0x00007ffff34decf1 in load (handle=...) at load_unload.cc:52
This used to work in 1.9.7.
This is also why system tests are failing on Jenkins.
parameters
is checked on the first line of BackendStore::parseFile()
, it returns on null, and the backend store is not instantiated further down below.
void
BackendStore::parseFile(const ConstElementPtr& parameters) {
if (!parameters) {
return;
}
[..]
BackendStore::instance().reset(new RotatingFile(path, base, unit, count,
prerotate, postrotate));
}