[Ipopt-tickets] [Ipopt] #185: Metadata handling might segfault in TNLPAdapter::FinalizeSolution
Ipopt
coin-trac at coin-or.org
Sat Mar 30 10:55:03 EDT 2013
#185: Metadata handling might segfault in TNLPAdapter::FinalizeSolution
----------------------+------------------------
Reporter: hpirnay | Owner: ipopt-team
Type: defect | Status: closed
Priority: low | Component: Ipopt
Version: 3.10 | Severity: normal
Resolution: fixed | Keywords: MetaData
----------------------+------------------------
Changes (by stefan):
* status: new => closed
* resolution: => fixed
Comment:
I have the impression that the IpTNLPAdapter routines check the length of
the arrays already.
For example, there is
{{{
SmartPtr<const DenseVectorSpace> x_space =
dynamic_cast<const DenseVectorSpace*>(GetRawPtr(x.OwnerSpace()));
const NumericMetaDataMapType x_meta = x_space->GetNumericMetaData();
NumericMetaDataMapType::const_iterator x_meta_iter;
for (x_meta_iter=x_meta.begin(); x_meta_iter!=x_meta.end();
++x_meta_iter) {
[...]
if ((Index)x_meta_iter->second.size()==x.Dim()) {
SmartPtr<DenseVector> x_meta_vector =
x_space->MakeNewDenseVector();
x_meta_vector->SetValues(&(x_meta_iter->second)[0]);
}}}
Only for z_U a size check was commented out, which I've added in again
with r2168.
If you think there are some more checks required, please reopen this
ticket.
--
Ticket URL: <https://projects.coin-or.org/ticket/185#comment:2>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list