Skip to content

Commit

Permalink
report if running with asan
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Dec 17, 2023
1 parent ab76f46 commit 71f96de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jni-c-toxcore/jni-c-toxcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#define VERSION_MINOR 99
#define VERSION_PATCH 95
static const char global_version_string[] = "0.99.95";
static const char global_version_asan_string[] = "0.99.95-ASAN";
// ----------- version -----------
// ----------- version -----------

Expand Down Expand Up @@ -3598,7 +3599,11 @@ Java_com_zoffcc_applications_trifa_MainActivity_tox_1version_1patch(JNIEnv *env,
JNIEXPORT jstring JNICALL
Java_com_zoffcc_applications_trifa_MainActivity_jnictoxcore_1version(JNIEnv *env, jobject thiz)
{
#if defined(__SANITIZE_ADDRESS__)
return (*env)->NewStringUTF(env, global_version_asan_string);
#else
return (*env)->NewStringUTF(env, global_version_string);
#endif
}

JNIEXPORT jstring JNICALL
Expand Down

0 comments on commit 71f96de

Please sign in to comment.