Opened 10 years ago

Closed 10 years ago

#13375 closed defect (fixed)

MIP set_problem_name crashes with GLPK backend if name is too long

Reported by: trehn Owned by: jason, jkantor
Priority: minor Milestone: sage-5.6
Component: numerical Keywords: mip, glpk
Cc: Merged in: sage-5.6.beta1
Authors: Thomas Rehn Reviewers: Christian Kuper
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Sage crashes with the following code

p = MixedIntegerLinearProgram(maximization=False, solver = "GLPK")
p.set_problem_name(''.join('a' for j in range(256)))

because the name is longer than 255 chars.

Attachments (1)

trac_13375_problem_name_length_check.patch (749 bytes) - added by trehn 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by trehn

comment:1 Changed 10 years ago by trehn

I wrote a patch that checks the length before passing it to GLPK and raises an exception in case it would be too long.

comment:2 Changed 10 years ago by trehn

Status: newneeds_review

comment:3 Changed 10 years ago by Christian Kuper

Status: needs_reviewpositive_review

Hello,

please add your real name to the "Authors" field of the ticket

Your ticket looks allright to me:

  • I can confirm the defect you patch is trying to solve
  • I could apply the patch without problems
  • No errors found in your coding, the ValueError? is thrown as promised
  • Although you did not change the doc I ran the doctest, of course: No issues

A small but helpful change!

Thanks!

Christian

comment:4 Changed 10 years ago by Christian Kuper

Reviewers: christiankuper

comment:5 Changed 10 years ago by trehn

Authors: Thomas Rehn

comment:6 Changed 10 years ago by Jeroen Demeyer

Reviewers: christiankuperChristian Kuper

comment:7 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.6.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.