#10699 closed Feature Requests (fixed)
Add a build flag to increase the size of REPORT_ERROR_BUFFER_SIZE
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | test |
Version: | Boost Release Branch | Severity: | Cosmetic |
Keywords: | Cc: |
Description
Hi,
Before requesting anything, please let me say that I've been using the Boost.Test library for more than 5 years and it is just great, thanks a lot!
And the small question or request:
Do you think that is a good idea to add a building flag or macro to tune the REPORT_ERROR_BUFFER_SIZE
?
The idea is just to add some lines like these in the file test/impl/execution_monitor.ipp
:
#ifdef BOOST_TEST_ERROR_SIZE_VALUE #define REPORT_ERROR_BUFFER_SIZE BOOST_TEST_ERROR_SIZE_VALUE #else #define REPORT_ERROR_BUFFER_SIZE 512 #endif
And remove/replace the static const int REPORT_ERROR_BUFFER_SIZE
of function report_error
, of course.
Does it has any sense to you?
Thanks!
Albert
PS: I assume that it's not possible to use "string" to hold any length of message, right?
PS: We need longer messages because in debug mode our exceptions print a backtrace, and 512 chars is just too few...
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | Boost Development Trunk → Boost Release Branch |
This is changed to 4096. hopefully this is enough for your purposes
comment:3 by , 7 years ago
Well, this fix smacks of "640K ought to be enough for anyone."
Remove the limit or make it configurable, please.
comment:4 by , 7 years ago
Replying to rogeeff:
This is changed to 4096. hopefully this is enough for your purposes
It probably is...
And in fact I already used this as workaround some times.
But I think that this is not an actual fix, right?
What do you think about the solution proposed in the description?
Altough doing it dynamic is for sure the best solution, the usage of a build parameter (define/macro) seems to me as a small patch and useful enogh?
Thanks!
Albert
PD: This is a duplicate of #7046? I didn't found it when I created the ticket...
I second that because this limited buffer size truncates my nice stack traces from exceptions and I have to fire up gdb to find the full stack trace, e.g.:
A proper fix would be to make the buffer size dynamic and remove any limits.