update constraints to have checks for negative or zero sizes#3367
update constraints to have checks for negative or zero sizes#3367SteveBronder wants to merge 3 commits intodevelopfrom
Conversation
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
|
@WardBrian now that we found the fix in |
|
I don’t think they are strictly necessary, but it’s a bit odd that before this PR some of them have checks and some of them don’t |
Submission Checklist
./runTests.py src/test/unitmake cpplintSummary
Related to #3366 this adds checks to deserializer so that negative numbers or size 0 integers are not accepted by constraints when they would not be valid.
For a few of the constraints we do allow size zero matrices, but were previously not handling them nicely. For instance
cholesky_factor_covrequests(N * (N + 1)) / 2 + (M - N) * Ndoubles from the deserializers vector. IfM=0we could end up requesting negative amounts of memory.Intended Effect
Check valid requests to deserializer early.
How to Verify
Tests were added to the deserializer's test suite and can be run with
Documentation
No new docs
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Steve Bronder
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: