# HG changeset patch # User Tom Ritter # Date 1547839212 18000 # Node ID 3296484c0237d1649160e337777979afff76f80b # Parent 3fc1e8cf6b7736e35da47473a9d4c7aca83fd0d6 Bug 1521133 - Disable string tail merging on Windows ASan builds. r=dmajor diff --git a/js/src/old-configure.in b/js/src/old-configure.in --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -603,16 +603,19 @@ case "$target" in changequote([,]) fi dnl VS2013+ supports -Gw for better linker optimizations. dnl http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx dnl Disabled on ASan because it causes false-positive ODR violations. if test -z "$MOZ_ASAN"; then CFLAGS="$CFLAGS -Gw" CXXFLAGS="$CXXFLAGS -Gw" + else + # String tail merging doesn't play nice with ASan's ODR checker. + LDFLAGS="$LDFLAGS -opt:nolldtailmerge" fi # khuey says we can safely ignore MSVC warning C4251 # MSVC warning C4244 (implicit type conversion may lose data) warns # and requires workarounds for perfectly valid code. Also, GCC/clang # don't warn about it by default. So for consistency/sanity, we turn # it off on MSVC, too. # MSVC warning C4267 warns for narrowing type conversions from size_t # to 32-bit integer types on 64-bit platforms. Since this is virtually diff --git a/old-configure.in b/old-configure.in --- a/old-configure.in +++ b/old-configure.in @@ -731,16 +731,19 @@ case "$target" in SSSE3_FLAGS="-mssse3" fi dnl VS2013+ supports -Gw for better linker optimizations. dnl http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx dnl Disabled on ASan because it causes false-positive ODR violations. if test -z "$MOZ_ASAN"; then CFLAGS="$CFLAGS -Gw" CXXFLAGS="$CXXFLAGS -Gw" + else + # String tail merging doesn't play nice with ASan's ODR checker. + LDFLAGS="$LDFLAGS -opt:nolldtailmerge" fi # khuey says we can safely ignore MSVC warning C4251 # MSVC warning C4244 (implicit type conversion may lose data) warns # and requires workarounds for perfectly valid code. Also, GCC/clang # don't warn about it by default. So for consistency/sanity, we turn # it off on MSVC, too. # MSVC warning C4267 warns for narrowing type conversions from size_t # to 32-bit integer types on 64-bit platforms. Since this is virtually