-
-
Notifications
You must be signed in to change notification settings - Fork 380
update constraints to have checks for negative or zero sizes #3367
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
base: develop
Are you sure you want to change the base?
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks
@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/unit
make cpplint
Summary
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_cov
requests(N * (N + 1)) / 2 + (M - N) * N
doubles from the deserializers vector. IfM=0
we 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: