[ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined by vitalybuka · Pull Request #121115 · llvm/llvm-project (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

vitalybuka

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@llvmbot llvmbot added clang

Clang issues not falling into any other category

clang:driver

'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

clang:frontend

Language frontend issues, e.g. anything involving "Sema"

labels

Dec 25, 2024

MaskRay

zygoloid

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@vitalybuka

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

thurstond

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@vitalybuka

Created using spr 1.3.4

[skip ci]

@vitalybuka

@vitalybuka vitalybuka changed the base branch from users/vitalybuka/spr/main.ubsan-remove-fsanitizervptr-from-fsanitizerundefined to main

December 27, 2024 03:54

@vitalybuka

@vitalybuka

@vitalybuka

thurstond

@vitalybuka vitalybuka deleted the users/vitalybuka/spr/ubsan-remove-fsanitizervptr-from-fsanitizerundefined branch

March 1, 2025 21:21

thurstond added a commit to thurstond/llvm-project that referenced this pull request

Mar 1, 2025

@thurstond

For backwards compatibility, parseSanitizeArgs had an incomplete refactoring in llvm#119819, in order to accommodate the special case of vptr in -fsanitize=undefined and its interaction with -fsanitize-trap=undefined. Now that vptr is no longer part of UBSan (llvm#121115), this patch changes parseSanitizeArgs to apply the AlwaysIn/Out invariants in parseSanitizeArgs, which allows simplifying calls to parseSanitizeArgs.

Note that this does change the error message of -fsanitize-trap=vptr.

llvm-beanz added a commit to llvm-beanz/llvm-project that referenced this pull request

Mar 3, 2025

@llvm-beanz

This adds the required executable suffix to make this test pass on Windows

llvm-beanz added a commit that referenced this pull request

Mar 3, 2025

@llvm-beanz

sbc100 added a commit to sbc100/emscripten that referenced this pull request

Mar 3, 2025

@sbc100

sbc100 added a commit to sbc100/emscripten that referenced this pull request

Mar 3, 2025

@sbc100

sbc100 added a commit to emscripten-core/emscripten that referenced this pull request

Mar 3, 2025

@sbc100

jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request

Mar 21, 2025

@vitalybuka @jph-13

jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request

Mar 21, 2025

@llvm-beanz @jph-13

thurstond added a commit that referenced this pull request

Apr 17, 2025

@thurstond

For backwards compatibility, parseSanitizeArgs/parseSanitizeTrapArgs had an incomplete refactoring in #119819, in order to accommodate the special case of vptr in -fsanitize=undefined and its interaction with -fsanitize-trap=undefined. Now that vptr is no longer part of -fsanitize=undefined (#121115), this patch changes parseSanitizeArgs to apply the AlwaysIn/Out invariants in parseSanitizeArgs, which allows simplifying calls to parseSanitizeArgs.

This is not quite NFC: it changes the error message of -fsanitize-trap=vptr.

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request

Apr 17, 2025

@thurstond @github-actions

For backwards compatibility, parseSanitizeArgs/parseSanitizeTrapArgs had an incomplete refactoring in llvm/llvm-project#119819, in order to accommodate the special case of vptr in -fsanitize=undefined and its interaction with -fsanitize-trap=undefined. Now that vptr is no longer part of -fsanitize=undefined (llvm/llvm-project#121115), this patch changes parseSanitizeArgs to apply the AlwaysIn/Out invariants in parseSanitizeArgs, which allows simplifying calls to parseSanitizeArgs.

This is not quite NFC: it changes the error message of -fsanitize-trap=vptr.

otegami added a commit to otegami/groonga that referenced this pull request

Apr 21, 2025

@otegami

If vptr is enabled, the following errors are raised during build steps because the vptr sanitizer requires RTTI, but RTTI is disabled (by default).

[397/398] Linking C executable src/suggest/groonga-suggest-create-dataset
FAILED: src/suggest/groonga-suggest-create-dataset
: && /usr/bin/clang -fsanitize=undefined -fno-sanitize=alignment -g  src/suggest/CMakeFiles/groonga-suggest-create-dataset.dir/groonga_suggest_create_dataset.c.o -o src/suggest/groonga-suggest-create-dataset  -Wl,-rpath,/groonga.ubsan/lib:/groonga.ubsan/_deps/llama_cpp-build/src:/groonga.ubsan/_deps/llama_cpp-build/ggml/src:  lib/libgroonga.so.0.0.0  /usr/lib/x86_64-linux-gnu/libmsgpackc.so.2.0.0  _deps/llama_cpp-build/src/libgroonga-llama.so.0.0.0  _deps/llama_cpp-build/ggml/src/libgroonga-ggml.so.0.0.0  _deps/llama_cpp-build/ggml/src/libgroonga-ggml-base.so.0.0.0 && :
/usr/bin/ld: lib/libgroonga.so.0.0.0: undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: lib/libgroonga.so.0.0.0: undefined reference to `__ubsan_handle_dynamic_type_cache_miss'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

llvm/llvm-project#121115

IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request

May 6, 2025

@thurstond @IanWood1

For backwards compatibility, parseSanitizeArgs/parseSanitizeTrapArgs had an incomplete refactoring in llvm#119819, in order to accommodate the special case of vptr in -fsanitize=undefined and its interaction with -fsanitize-trap=undefined. Now that vptr is no longer part of -fsanitize=undefined (llvm#121115), this patch changes parseSanitizeArgs to apply the AlwaysIn/Out invariants in parseSanitizeArgs, which allows simplifying calls to parseSanitizeArgs.

This is not quite NFC: it changes the error message of -fsanitize-trap=vptr.

IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request

May 6, 2025

@thurstond @IanWood1

For backwards compatibility, parseSanitizeArgs/parseSanitizeTrapArgs had an incomplete refactoring in llvm#119819, in order to accommodate the special case of vptr in -fsanitize=undefined and its interaction with -fsanitize-trap=undefined. Now that vptr is no longer part of -fsanitize=undefined (llvm#121115), this patch changes parseSanitizeArgs to apply the AlwaysIn/Out invariants in parseSanitizeArgs, which allows simplifying calls to parseSanitizeArgs.

This is not quite NFC: it changes the error message of -fsanitize-trap=vptr.