8000 fix valgrind warnings on using uninit value when compiled with fix by svigerske · Pull Request #834 · coin-or/Ipopt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix valgrind warnings on using uninit value when compiled with fix #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: stable/3.14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Algorithm/IpPDPerturbationHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ bool PDPerturbationHandler::ConsiderNewSystem(
}
delta_d = delta_d_curr_ = delta_c;

delta_x = 0.;
delta_s = 0.;

if( hess_degenerate_ == DEGENERATE )
{
delta_x_curr_ = 0.;
Expand All @@ -226,11 +229,6 @@ bool PDPerturbationHandler::ConsiderNewSystem(
return false;
}
}
else
{
delta_x = 0.;
delta_s = delta_x;
}

delta_x_curr_ = delta_x;
delta_s_curr_ = delta_s;
Expand Down
3 changes: 3 additions & 0 deletions src/Common/IpUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
'#define small char' */
#undef small
#endif
#ifdef max
#undef max
#endif
#define TWO_TO_THE_THIRTYTWO 4294967296.0
#define DELTA_EPOCH_IN_SECS 11644473600.0
inline double IpCoinGetTimeOfDay()
Expand Down
< 8000 copilot-diff-entry data-file-path="src/Interfaces/IpStdCInterface.cpp" >
8 changes: 8 additions & 0 deletions src/Interfaces/IpStdCInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ enum ApplicationReturnStatus IpoptSolve(
exc.ReportException(*ipopt_problem->app->Jnlst(), Ipopt::J_ERROR);
status = Ipopt::Unrecoverable_Exception;
}
catch( ... )
{
// catch all non-Ipopt exceptions, though this is also done in OptimizeTNLP as well
// further, re-throwing non-Ipopt exceptions should be turned off (see also CreateIpoptProblem)
assert(!ipopt_problem->app->RethrowNonIpoptException(false));
ipopt_problem->app->Jnlst()->Printf(Ipopt::J_ERROR, Ipopt::J_MAIN, "Error: Unknown exception was thrown.");
status = Ipopt::Unrecoverable_Exception;
}
ipopt_problem->tnlp = NULL;

delete[] start_x;
Expand Down
0