Opened 9 years ago

Closed 9 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


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 9 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 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 9 years ago by trehn

  • Status changed from new to needs_review

comment:3 Changed 9 years ago by christiankuper

  • Status changed from needs_review to positive_review


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!



comment:4 Changed 9 years ago by christiankuper

  • Reviewers set to christiankuper

comment:5 Changed 9 years ago by trehn

  • Authors set to Thomas Rehn

comment:6 Changed 9 years ago by jdemeyer

  • Reviewers changed from christiankuper to Christian Kuper

comment:7 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.6.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.