Boost logo

Boost Testing :

From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2008-01-02 15:02:55


I've noticed that the Pgi compiler generates very long error messages
(some in excess of 500k bytes). Diagnostics this long cause
process_jam_log to hang or get killed with a stack overflow message
(probably caused by recursion in the split function).

I'd like to propose we only process the first 8k bytes of an error
message and throw away the rest. Truncating the line length gets the
Pgi test results reporting working reliably. I've attached a simple
patch to process_jam_log.cpp that I'd like to apply if there's no
objections. If people prefer, we could use a 16k limit instead of 8k.

-- Noel

[kbelco_at_sahp7645 src]$ svn diff
Index: process_jam_log.cpp
--- process_jam_log.cpp (revision 42416)
+++ process_jam_log.cpp (working copy)
@@ -633,9 +633,12 @@
    // * Calls stop_message() to stop capturing lines.
    // * Capture lines if line capture on.

+ static const int max_line_length = 8192;
    int line_num = 0;
    while ( std::getline( *input, line ) )
+ if (max_line_length < line.size()) line = line.substr(0,

      std::vector<std::string> const line_parts( split( line ) );

Boost-testing list run by mbergal at