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

Make CK_MAX_MSG_SIZE dynamically configurable? #127

Closed
orenbenkiki opened this issue Aug 26, 2017 · 1 comment
Closed

Make CK_MAX_MSG_SIZE dynamically configurable? #127

orenbenkiki opened this issue Aug 26, 2017 · 1 comment

Comments

@orenbenkiki
Copy link

I realize that placing a limit on the message size is a good thing (4GB, shudder...). However, making it a compile-time #define seems overly restrictive. How about making it dynamically configurable (keeping 8K as the default limit)?

I just run into a case where I dump two objects to textual format and compare the dumps. The dumps were 2056 characters long... which caused libcheck to die horribly. If the maximal size was configurable I could just bump it up to, say, 16K instead of 8K and solve my problem (my computer has 16GB, surely 16K in a message isn't an issue...?).

I link with the libcheck version I got from apt-get. To modify the limit I'd have to switch to a private patched version - and force my users to do the same. To obey the limit, I'd have to write convoluted code that somehow splits the dumped data on <2K chunks (say, on a line boundary...).

A possible objection is that people might abuse such a dynamic size configuration. True... but if someone explicitly sets the maximal size to 4GB, they can't really complain about the unpleasant side effects - especially if the documentation explained that excessive message sizes are inadvisable.

@brarcher
Copy link
Contributor

I've no objection to allowing this to be configurable, perhaps via environment variable. The messages are stored in a file until the test completes, in which case they are read back out. So, only one message should be in memory at a time anyway.

If you would like to prototype making the max size configurable, I would accept the resulting pull request if you are satisfied with the result.

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

2 participants