Skip to content
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

Memory crash in CLP, file ClpPrimalColumnSteepest.cpp; pivotsequence #18

Closed
svigerske opened this issue Mar 2, 2019 · 5 comments
Closed

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: ltaylor

Original creation time: 2008-02-14 01:43:09

Assignee: somebody

Version:

Keywords: vector memory access pivot variable primal column steepest

I am using MS Visual Basic to call COINMP, which uses the clp code.

The application caught an exception while performing LP; crash was
accessing forbidden memory.

I had had several crashes previously, but I had not been able to
catch it. This time, debugging was turned on for all modules down
to this one.
clpprimalcolumnsteepest.cpp
about line 2804
file appears to be current as of today, 2-13-08

This is the code:

	if (pivotSequence_>=0) {
	  // save pivot order
	  CoinMemcpyN(pivotVariable,
		 numberRows,alternateWeights_->getIndices());
	  // change from pivot row number to sequence number
	  pivotSequence_=pivotVariable[pivotSequence_];
	}

I am guessing from the comment and from the code that it probably
should be a reference like this instead ...

pivotSequence_ =pivotVariable[pivotRow]

When debugging caught the error, pivotSequence_ was 2961, while
the capacity of pivotVariable was only 199.

The attached file contains:

  • locals

  • error message as given by MS Visual Studio

  • stack trace

@svigerske
Copy link
Member Author

Attachment MemoryAccessCrash-080213.txt by ltaylor created at 2008-02-14 01:44:25

Error, stack, locals

@svigerske
Copy link
Member Author

Comment by ltaylor created at 2008-02-15 19:17:10

It seems to me now that this error occurs because, somewhere, pivotSequence_ should be set back to -1 or something, and it isn't always.

If pivotSequence was used before, when pivotVariable[] was a large array, and not reset, and then used again when pivotVariable[] is a small array, it could cause this error.

LAT

@svigerske
Copy link
Member Author

Comment by ltaylor created at 2008-02-16 00:06:29

I was unable to upload the MPS file corresponding to the problem that COIN-MP was working on when it crashed. (Even compressed and zipped, it exceeded the maximum attachment size.)

I would be happy to upload this file, 44 Mb, or its zip archive, 6 Mb, on request. How can we do this?

Of course, since this is a memory-based problem, it probably depends on the specific configuration in order to crash. It should, however, always cause a violation of range-checking if you turn that on in debugging.

Finally, since I was using this module through COIN-MP calls and not as CLP stand-alone, there may possibly be some difference due to how it is called. I suspect that it would be deterministic, with the same steps and results, up to a point of range violation.

Let me know what I can do to help.

LAT

@svigerske
Copy link
Member Author

Comment by @jjhforrest created at 2009-07-07 19:10:04

It should be pivotSequence_ but the bug has been fixed anyway

@svigerske
Copy link
Member Author

Comment by @jjhforrest created at 2009-07-07 19:10:04

Resolution: fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant