[Libreoffice] LibreOffice / valgrind detection ...

Caolán McNamara caolanm at redhat.com
Fri Jun 24 03:54:29 PDT 2011


On Fri, 2011-06-24 at 11:30 +0100, Michael Meeks wrote:
>  
> -    if (getenv("G_SLICE") != NULL)
> +    if (RUNNING_ON_VALGRIND)
> +    {
> +        putenv ("G_SLICE=1");
> +        fprintf(stderr, "LibreOffice: running under valgrind detected.\n");
> +        alloc_mode = AMode_SYSTEM;
> +    }
> +    else if (getenv("G_SLICE") != NULL)
>      {
...
> 	That might help the QA guys automagically generate better valgrind
> traces with less effort ?

export VALGRIND=memcheck
is really a major barrier ?, *shrug*, I don't have any major objections
to the principle.

The (overblown) osl_setEnvironment wraps setenv where available FWIW.

C.



More information about the LibreOffice mailing list