-
Notifications
You must be signed in to change notification settings - Fork 23
Address sanitizer/ndk28c #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CedricGuillemet
wants to merge
34
commits into
BabylonJS:main
Choose a base branch
from
CedricGuillemet:ASAN
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
e1150fb
Address sanitizer
CedricGuillemet a569011
template parameter
CedricGuillemet f0308c8
default values
CedricGuillemet 41d85d3
JNI sanitizer
CedricGuillemet 7ef0e14
android image with asan
CedricGuillemet 657a9ee
ASAN from android ndk
CedricGuillemet 5a23a08
macos13
CedricGuillemet fddf441
up android extensions
CedricGuillemet 6e9c40d
implicit instantiation of undefined template
CedricGuillemet e552838
casting u16
CedricGuillemet 032df9e
macos14
CedricGuillemet f27f623
up ios simulator
CedricGuillemet 7abc893
PR feedback
CedricGuillemet dda689a
mangled names
CedricGuillemet eda3414
syntax
CedricGuillemet f0594ca
copy/paste
CedricGuillemet ced60d1
typo
CedricGuillemet 1979429
more on name demangle
CedricGuillemet 871fbd8
namespace test
CedricGuillemet 1738f3b
yet another namespace test
CedricGuillemet 14afcdc
once more
CedricGuillemet 8f53e65
recursive call
CedricGuillemet 49e7870
revert namespace tweaks
CedricGuillemet f1d3e31
Merge branch 'main' of https://github.com/BabylonJS/JsRuntimeHost int…
CedricGuillemet f1cba24
use clang for sanitizer
CedricGuillemet 1f56b79
sanitizer
CedricGuillemet fc90f72
kick build
CedricGuillemet 14d1a39
something is wrong with jsc
CedricGuillemet 3faa15d
casting maybe?
CedricGuillemet 3ea8de8
false positive
CedricGuillemet a2d6080
yet another test
CedricGuillemet 32f147e
disable asan
CedricGuillemet 23d57b6
fix template attribute
CedricGuillemet 12d5cf9
check finite
CedricGuillemet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ FetchContent_Declare(arcana.cpp | |
| GIT_TAG c726dbe58713eda65bfb139c257093c43479b894) | ||
| FetchContent_Declare(AndroidExtensions | ||
| GIT_REPOSITORY https://github.com/bghgary/AndroidExtensions.git | ||
| GIT_TAG 7d88a601fda9892791e7b4e994e375e049615688) | ||
| GIT_TAG 24370fff52a03ef43dcf5e5fcb8b84338b779a05) | ||
| FetchContent_Declare(asio | ||
| GIT_REPOSITORY https://github.com/chriskohlhoff/asio.git | ||
| GIT_TAG f693a3eb7fe72a5f19b975289afc4f437d373d9c) | ||
|
|
@@ -73,6 +73,31 @@ option(JSRUNTIMEHOST_POLYFILL_ABORT_CONTROLLER "Include JsRuntimeHost Polyfills | |
| option(JSRUNTIMEHOST_POLYFILL_WEBSOCKET "Include JsRuntimeHost Polyfill WebSocket." ON) | ||
| option(JSRUNTIMEHOST_POLYFILL_BLOB "Include JsRuntimeHost Polyfill Blob." ON) | ||
|
|
||
| # Sanitizers | ||
| option(ENABLE_SANITIZERS "Enable AddressSanitizer and UBSan" OFF) | ||
|
|
||
| if(ENABLE_SANITIZERS) | ||
| set(ENABLE_RTTI ON CACHE BOOL "" FORCE) | ||
| if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") | ||
| set(SANITIZERS "address,undefined") | ||
| # Check for Clang since vptr and fdsan are Clang-specific | ||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| list(APPEND SANITIZERS "vptr") | ||
| # FDSan only works on Android builds with Clang | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we sure it doesn't work with linux (and macOS) as well? is it an issue with clang version in default Ubuntu 24.x and Xcode pre-26? if that's the actual case, can this check be specific about the clang version instead of the OS/platform? |
||
| if (ANDROID) | ||
| list(APPEND SANITIZERS "fdsan") | ||
| endif() | ||
| endif() | ||
|
|
||
| string(JOIN "," SANITIZER_FLAGS ${SANITIZERS}) | ||
|
|
||
| add_compile_options(-fsanitize=${SANITIZER_FLAGS} -fno-omit-frame-pointer) | ||
| add_link_options(-fsanitize=${SANITIZER_FLAGS}) | ||
| else() | ||
| message(WARNING "Sanitizers not supported on this compiler.") | ||
| endif() | ||
| endif() | ||
|
|
||
| # -------------------------------------------------- | ||
|
|
||
| FetchContent_MakeAvailable_With_Message(arcana.cpp) | ||
|
|
||
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.