-
Notifications
You must be signed in to change notification settings - Fork 274
ansi_c_entry_point: avoid magic number #6007
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
Conversation
014b099
to
7b42c3a
Compare
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.
On real systems this might be substantially lower, see getconf ARG_MAX
for POSIX, for instance. Maybe we should have an instrumentation option that allows setting the value (with the system's limit as default)?
7b42c3a
to
3c4a5d4
Compare
Good call. I've now handled the Windows case, but for Unix it will indeed require an instrumentation option. I'm not sure how useful this even is, to be honest, so I'll not bother implementing this for now. We have |
Codecov Report
@@ Coverage Diff @@
## develop #6007 +/- ##
===========================================
+ Coverage 76.62% 76.64% +0.01%
===========================================
Files 1578 1578
Lines 181180 181185 +5
===========================================
+ Hits 138833 138865 +32
+ Misses 42347 42320 -27
Continue to review full report at Codecov.
|
3c4a5d4
to
09980ce
Compare
09980ce
to
ec44b95
Compare
ec44b95
to
7748745
Compare
7748745
to
6279c5f
Compare
6279c5f
to
4b7c818
Compare
4b7c818
to
4fcf82c
Compare
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 fine to me as is. Take my one comment as a suggestion to ponder, and not a requirement.
99dc7ec
to
5b31bd7
Compare
The code previously hard-coded an upper bound for argc that perhaps was suitable for 32-bit systems (albeit even questionable for that case). Replace this calculation by one that refers to configured bit widths, and move this limit to configt. Fixes: diffblue#1708
5b31bd7
to
658de79
Compare
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.
Much cleaner to my (biased) eye - thanks for the updates :-)
The code previously hard-coded an upper bound for argc that perhaps was
suitable for 32-bit systems (albeit even questionable for that case).
Replace this calculation by one that refers to configured bit widths.