VirtualBox

Changeset 66170 in vbox


Ignore:
Timestamp:
Mar 20, 2017 2:35:00 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114079
Message:

bugref:8019: Undefined behaviour sanitiser: disable the leak check when running the VBoxOGLTest tool, as it contains known memory leaks which make the sanitiser report failure.

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk

    r65381 r66170  
    408408ifneq ($(KBUILD_TARGET),darwin)
    409409  VBoxOGLTest_SOURCES = OpenGLTest/OpenGLTest.cpp
     410 ifneq ($(KBUILD_TARGET),win)
     411  VBoxOGLTest_DEFS += $(if $(VBOX_WITH_GCC_SANITIZER),VBOX_WITH_GCC_SANITIZER,)
     412 endif
    410413endif
    411414VBoxOGLTest_SOURCES.darwin = OpenGLTest/OpenGLTestDarwin.cpp
  • trunk/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp

    r62489 r66170  
    4545    uint64_t StartTS;
    4646
     47#ifdef VBOX_WITH_GCC_SANITIZER
     48    /* The OpenGL test tool contains a number of memory leaks which cause it to
     49     * return failure when run with ASAN unless we disable the leak detector. */
     50    RTENV env;
     51    if (RT_FAILURE(RTEnvClone(&env, RTENV_DEFAULT)))
     52        return false;
     53    RTEnvPutEx(env, "ASAN_OPTIONS=detect_leaks=0");  /* If this fails we will notice later */
     54#endif
    4755    rc = RTPathExecDir(pszVBoxPath, RTPATH_MAX); AssertRCReturn(rc, false);
    4856#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
     
    5462    AssertRCReturn(rc, false);
    5563
     64#ifndef VBOX_WITH_GCC_SANITIZER
    5665    rc = RTProcCreate(pszVBoxPath, papszArgs, RTENV_DEFAULT, 0, &Process);
     66#else
     67    rc = RTProcCreate(pszVBoxPath, papszArgs, env, 0, &Process);
     68    RTEnvDestroy(env);
     69#endif
    5770    if (RT_FAILURE(rc))
    5871        return false;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette