VirtualBox

Changeset 72091 in vbox


Ignore:
Timestamp:
May 3, 2018 12:53:03 PM (7 years ago)
Author:
vboxsync
Message:

Address sanitiser: split up option into statically and dynamically linked.
bugref:8019: Undefined behaviour sanitiser
When we link the address sanitiser libraries dynamically we need to set
LD_LIBRARY_PATH for the 3D test to work. However, when we link statically
the test suite causes problems. So have an option for both and let the
developer choose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r72069 r72091  
    29202920
    29212921# The address sanitiser library intercepts dlopen() and breaks RPATH $ORIGIN,
    2922 # so we need to link it statically.
     2922# so we need to link it statically or set LD_LIBRARY_PATH.  To link statically,
     2923# set VBOX_WITH_GCC_SANITIZER_STATIC in addition.
    29232924ifdef VBOX_WITH_GCC_SANITIZER
    29242925 VBOX_GCC_SANITIZER_FLAGS := \
     
    29302931        -fno-sanitize=alignment \
    29312932        -fno-sanitize=vptr \
    2932         -fno-common \
    2933         -static-libasan
     2933        -fno-common
    29342934else
    29352935 VBOX_GCC_SANITIZER_FLAGS =
     
    29372937
    29382938# -libasan-static is currently not supported in combination with -no-undefined.
     2939VBOX_GCC_NO_UNDEFINED    :=
     2940VBOX_GCC_NO_UNDEFINED_R0 :=
    29392941ifdef VBOX_WITH_GCC_SANITIZER
    2940  VBOX_GCC_NO_UNDEFINED    :=
    2941  VBOX_GCC_NO_UNDEFINED_R0 :=
    2942 else
    2943  VBOX_GCC_NO_UNDEFINED    := -Wl,--no-undefined
    2944  VBOX_GCC_NO_UNDEFINED_R0 := -no-undefined
     2942 ifdef VBOX_WITH_GCC_SANITIZER_STATIC
     2943  VBOX_GCC_NO_UNDEFINED    := -Wl,--no-undefined
     2944  VBOX_GCC_NO_UNDEFINED_R0 := -no-undefined
     2945  VBOX_GCC_SANITIZER_FLAGS += -static-libasan
     2946 else
     2947  VBOX_GCC_SANITIZER_FLAGS += -lasan
     2948 endif
    29452949endif
    29462950
Note: See TracChangeset for help on using the changeset viewer.

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