# log at the same time (actually you can't). However, if you update this
# file after the commit hash is fixed, you are free to add the commit hash.
################################################################################
+2017-10-20 Slava Barinov <v.barinov@samsung.com>
+
+ [TTC-9] Enable recovery mode for ASan with leak detector
+
+2017-10-17 Mikhail Kashkarov <m.kashkarov@partner.samsung.com>
+
+ Add armv7hl support.
2017-09-26 Dongkyun Son <dongkyun.s@samsung.com>
--- /dev/null
+/* { dg-do run } */
+/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=0" } */
+
+#include <stdlib.h>
+
+int f () {
+ volatile int* a = malloc(20);
+ a[0] = 1;
+ return a[0];
+}
+
+int main() {
+ f();
+}
+
+/* { dg-output {Direct leak of 20 byte} } */
--- /dev/null
+/* { dg-do run } */
+/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=1" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+
+int f () {
+ volatile int* a = malloc(20);
+ a[0] = 1;
+ return a[0];
+}
+
+int main() {
+ f();
+}
+
+/* { dg-output {Direct leak of 20 byte} } */
if (CAN_SANITIZE_LEAKS) {
__lsan::InitCommonLsan();
if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) {
- Atexit(__lsan::DoLeakCheck);
+ if (flags()->halt_on_error)
+ Atexit(__lsan::DoLeakCheck);
+ else
+ Atexit(__lsan::DoRecoverableLeakCheckVoid);
}
}
return have_leaks ? 1 : 0;
}
+void DoRecoverableLeakCheckVoid() {
+ DoRecoverableLeakCheck();
+}
+
static Suppression *GetSuppressionForAddr(uptr addr) {
Suppression *s = nullptr;
namespace __lsan {
void InitCommonLsan() { }
void DoLeakCheck() { }
+void DoRecoverableLeakCheckVoid() { }
void DisableInThisThread() { }
void EnableInThisThread() { }
}
// Functions called from the parent tool.
void InitCommonLsan();
void DoLeakCheck();
+void DoRecoverableLeakCheckVoid();
bool DisabledInThisThread();
// Used to implement __lsan::ScopedDisabler.