summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-03-07 11:21:37 -0800
committerElliott Hughes <enh@google.com>2015-03-07 11:21:37 -0800
commit02ff4b8febf5e2355cfa2b141df3971d21ed1424 (patch)
tree4c48f81e700533baef2579307335476562c1e0b0 /liblog
parent6385d626a585017ec1fe4027f4faa79741f9d117 (diff)
downloadsystem_core-02ff4b8febf5e2355cfa2b141df3971d21ed1424.zip
system_core-02ff4b8febf5e2355cfa2b141df3971d21ed1424.tar.gz
system_core-02ff4b8febf5e2355cfa2b141df3971d21ed1424.tar.bz2
Fix __android_log_assert to abort.
If you rely on __builtin_trap, it's likely to use an illegal instruction, which is a misleading way to abort. If we just call abort, it's more immediately obvious that we've aborted. Bug: 19644330 Change-Id: I63a962e4748aec7b019ea94b007593e478a3b61a
Diffstat (limited to 'liblog')
-rw-r--r--liblog/logd_write.c2
-rw-r--r--liblog/logd_write_kern.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/liblog/logd_write.c b/liblog/logd_write.c
index cd0a216..a865093 100644
--- a/liblog/logd_write.c
+++ b/liblog/logd_write.c
@@ -491,7 +491,7 @@ void __android_log_assert(const char *cond, const char *tag,
}
__android_log_write(ANDROID_LOG_FATAL, tag, buf);
- __builtin_trap(); /* trap so we have a chance to debug the situation */
+ abort(); /* abort so we have a chance to debug the situation */
/* NOTREACHED */
}
diff --git a/liblog/logd_write_kern.c b/liblog/logd_write_kern.c
index 2ca3c94..ca63067 100644
--- a/liblog/logd_write_kern.c
+++ b/liblog/logd_write_kern.c
@@ -266,7 +266,7 @@ void __android_log_assert(const char *cond, const char *tag,
}
__android_log_write(ANDROID_LOG_FATAL, tag, buf);
- __builtin_trap(); /* trap so we have a chance to debug the situation */
+ abort(); /* abort so we have a chance to debug the situation */
/* NOTREACHED */
}