id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
15159 Segfault after deepcopy of MixedIntegerLinearProgram jvkersch "I wanted to make a copy of a linear program and modify the copy somewhat further. Using `deepcopy` I get a segfault (tested under 5.12.beta4) running the following:
{{{
sage: p = MixedIntegerLinearProgram()
sage: w = p.new_variable()
sage: q = deepcopy(p)
sage: q.add_constraint(w[0] >= 0)
------------------------------------------------------------------------
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off(). You might
want to run Sage under gdb with 'sage -gdb' to debug this.
Sage will now terminate.
------------------------------------------------------------------------
}}}
The same segfault happens when one instead defines a new variable for the new linear program and tries to add constraints in terms of that variable:
{{{
sage: p = MixedIntegerLinearProgram()
sage: q = deepcopy(p)
sage: w = q.new_variable()
sage: q.add_constraint(w[0] >= 0)
}}}
Everything works well when using `copy` instead of `deepcopy`. Nevertheless, could this be related to #11588?" defect closed major sage-duplicate/invalid/wontfix linear programming fixed vdelecroix vbraun dimpase Travis Scrimshaw N/A #20414