-
Notifications
You must be signed in to change notification settings - Fork 219
Description
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.