[Libreoffice] [SOLVED] Debug-mode getline-using sal unittest crashes, triggered by _GLIBCXX_DEBUG
Nigel Hawkins
n.hawkins at gmx.com
Thu Jun 30 05:26:06 PDT 2011
On Wed, 2011-06-29 at 23:26 +0200, Julien Nabet wrote:
> diff --git a/sal/qa/osl/process/osl_process.cxx
> b/sal/qa/osl/process/osl_process.cxx
> index 2535c4c..8695d79 100644
> --- a/sal/qa/osl/process/osl_process.cxx
> +++ b/sal/qa/osl/process/osl_process.cxx
> @@ -477,6 +477,7 @@ public:
> );
>
> std::string line;
> + line.reserve(10000);
> while (std::getline(file, line, '\0'))
> env_container->push_back(line);
> tidy_container(*env_container);
That change fixes the problem here.
Nigel
More information about the LibreOffice
mailing list