Calling terminate() on ECBS object caused a segfault because terminate() is implemented by the base class CBS. This method called printPaths() (from the base implementation) which caused the segfault since the member variable paths_found_initially from the base implementation was empty.
To make matters confusing, the base class had a protected variable paths_found_initially but the subclass "shadows" this variable by defining a private variable with the same
name (paths_found_initially) but a different type.
This change updates access specifiers to align with usage and prevent segfault when CBS::terminate() is called from a subclass.
Calling
terminate()
onECBS
object caused a segfault becauseterminate()
is implemented by the base classCBS
. This method calledprintPaths()
(from the base implementation) which caused the segfault since the member variablepaths_found_initially
from the base implementation was empty.To make matters confusing, the base class had a protected variable
paths_found_initially
but the subclass "shadows" this variable by defining a private variable with the same name (paths_found_initially
) but a different type.This change updates access specifiers to align with usage and prevent segfault when
CBS::terminate()
is called from a subclass.Fixes #2