[Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #13: segmentation fault in CouenneProblem::realign()

Couenne, a solver for non-convex MINLP problems coin-trac at coin-or.org
Sat Jul 14 14:56:00 EDT 2012


#13: segmentation fault in CouenneProblem::realign()
-------------------------+----------------------
  Reporter:  stefan      |      Owner:  somebody
      Type:  defect      |     Status:  new
  Priority:  major       |  Milestone:
 Component:  component1  |    Version:
Resolution:              |   Keywords:
-------------------------+----------------------

Comment (by stefan):

 Bug still there with rev 869.

 Running Couenne at the model
 {{{
 Variables  x1,x2,x3,x4,x5,x6;

 Equations  e1,e2,e3,e4,e5;

 e1..    x6 =E= 0;

 e2..    x1*x5 =E= 0;

 e3..  - x2 + x3 =E= 0;

 e4..    x3 - x4 =E= 0;

 e5..  - x1 + x2 =E= 0;

 Model m / all /;
 Solve m using NLP minimizing x6;
 }}}
 gives
 {{{
 ==6543== Invalid read of size 8
 ==6543==    at 0x74CB413:
 Couenne::exprCopy::realign(Couenne::CouenneProblem const*)
 (expression.cpp:209)
 ==6543==    by 0x749A2EF: Couenne::CouenneProblem::realign()
 (problem.cpp:384)
 ==6543==    by 0x74B7B07:
 Couenne::CouenneProblem::reformulate(Couenne::CouenneCutGenerator*)
 (reformulate.cpp:89)
 ==6543==    by 0x716B4F0: Couenne::CouenneSetup::InitializeCouenne(char**,
 Couenne::CouenneProblem*, Ipopt::SmartPtr<Bonmin::TMINLP>,
 Couenne::CouenneInterface*, Bonmin::Bab*) (BonCouenneSetup.cpp:256)
 ==6543==  Address 0x5b1c2f0 is 0 bytes inside a block of size 24 free'd
 ==6543==    at 0x4C285BC: operator delete(void*) (in /usr/lib64/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==6543==    by 0x749FB53: Couenne::exprVar::~exprVar()
 (CouenneExprVar.hpp:65)
 ==6543==    by 0x74CB51C:
 Couenne::exprCopy::realign(Couenne::CouenneProblem const*)
 (expression.cpp:221)
 ==6543==    by 0x749A2EF: Couenne::CouenneProblem::realign()
 (problem.cpp:384)
 ==6543==    by 0x74B7B07:
 Couenne::CouenneProblem::reformulate(Couenne::CouenneCutGenerator*)
 (reformulate.cpp:89)
 ==6543==    by 0x716B4F0: Couenne::CouenneSetup::InitializeCouenne(char**,
 Couenne::CouenneProblem*, Ipopt::SmartPtr<Bonmin::TMINLP>,
 Couenne::CouenneInterface*, Bonmin::Bab*) (BonCouenneSetup.cpp:256)
 }}}

 In Couenne, model is printed as
 {{{
 objectives:
 min
 constraints:
 (x_0*x_4) = 0
 (-x_1+x_2) = 0
 (x_2-x_3) = 0
 (-x_0+x_1) = 0
 variables:
 x_0 [ -1e+50 , 1e+50 ]
 x_1 [ -1e+50 , 1e+50 ]
 x_2 [ -1e+50 , 1e+50 ]
 x_3 [ -1e+50 , 1e+50 ]
 x_4 [ -1e+50 , 1e+50 ]
 end
 }}}

 With a {{{print()}}} in {{{CouenneProblem::realign()}}} and the debug
 output in {{{exprCopy::realign()}}}, I get
 {{{
 objectives:
 min
 constraints:
 w_6 = 0
 variables:
 x_0 [ -1e+50 , 1e+50 ]
 x_4 [ -1e+50 , 1e+50 ]
 w_5 (r:2, m:1) := (x_0*x_4) [ -inf , inf ]
 w_6 (r:3, m:1) := w_5 [ -inf , inf ]
 end
 exprCopy::realign replaces 6d19e0 with 6d92e0 (x_1 --> w_1)
 }}}

-- 
Ticket URL: <https://projects.coin-or.org/ticket/13#comment:1>
Couenne, a solver for non-convex MINLP problems <https://projects.coin-or.org/Couenne>
Couenne, a solver for non-convex MINLP problems



More information about the Couenne-tickets mailing list