Skip to content

Make CK_MAX_MSG_SIZE dynamically configurable? #127

@orenbenkiki

Description

@orenbenkiki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions