Le 29/06/2011 08:44, Julien Nabet a écrit :
Hello,

I tried the patch attached. In fact, I remarked by reading some forums (sorry i don't remember the specific link I read) that getline could need some extra precaution. I don't know if this patch is correct but there's no more memory error. However there's now an assertion failure because number of env vars is different from number children env vars.
Sorry, in my previous message the call of the function "ignore" was hiding the problem.

However I found that if I apply this patch, it works :
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);

(I haven't search about adjusting reserve)

Julien.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to