• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1311 (tree)
Time2018-03-14 10:12:08
Authorsrz_zumix

Log Message

add MemorySanitizer attribute macro #43

git@c9306e324c4ba27281f4ca3d506e0bdd0f9ca079
https://github.com/srz-zumix/iutest/commit/c9306e324c4ba27281f4ca3d506e0bdd0f9ca079


fix cpplint
git@d621c33c815a8ecb7e1cd014a09f1695e0b349ba


googletest lastest is behavior changed...

git@e7da8f68d245529cba9cd5f008e1b019126d62c1


circle ci yml migrate from 1.0 to 2.0

git@f935462ee967d4c1e7c452ab68b2a8cf7ada6e13

Change Summary

Incremental Difference

--- trunk/circle.yml (revision 1310)
+++ trunk/circle.yml (nonexistent)
@@ -1,37 +0,0 @@
1-general:
2- branches:
3- ignore:
4- - gh-pages
5-
6-dependencies:
7- pre:
8- - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
9- - wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
10- - sudo add-apt-repository -y 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main'
11- - sudo apt-get -y --allow-unauthenticated update
12- override:
13- - sudo apt-get -qq install clang-3.9
14- - sudo apt-get -qq install g++-4.9
15- post:
16- - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90
17- - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90
18- - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 60
19- - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 60
20-
21-test:
22- override:
23- - make CXX=g++ showcxxversion:
24- pwd: test
25- - make CXX=clang++ showcxxversion:
26- pwd: test
27- - make CXX=clang++ minimum_tests && ./minimum_tests --spec :
28- pwd: test
29- - case $CIRCLE_NODE_INDEX in 0) make all CXX=g++ OUTPUTXML=1 OPTIMIZE=-O2 ;; 1) make all CXX=g++ OUTPUTXML=1 OPTIMIZE=-Os ;; 2) make all CXX=g++ OUTPUTXML=1 OPTIMIZE=-O3 ;; 3) make all CXX=g++ OUTPUTXML=1 OPTIMIZE=-O4 ;; esac :
30- parallel: true
31- pwd: test
32- - case $CIRCLE_NODE_INDEX in 0) make all CXX=clang++ OUTPUTXML=1 OPTIMIZE=-O2 ;; 1) make all CXX=clang++ OUTPUTXML=1 OPTIMIZE=-Os ;; 2) make all CXX=clang++ OUTPUTXML=1 OPTIMIZE=-O3 ;; 3) make all CXX=clang++ OUTPUTXML=1 OPTIMIZE=-Oz ;; esac :
33- parallel: true
34- pwd: test
35- post:
36- - mkdir -p $CIRCLE_TEST_REPORTS/junit/
37- - find . -type f -regex ".*/test/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
--- trunk/include/internal/iutest_compiler.hpp (revision 1310)
+++ trunk/include/internal/iutest_compiler.hpp (revision 1311)
@@ -1224,7 +1224,34 @@
12241224 # define IUTEST_ATTRIBUTE_INIT_PRIORITY_(n)
12251225 #endif
12261226
1227+//! MemorySanitizer
1228+#if !defined(IUTEST_HAS_MEMORY_SANITIZER)
1229+# if defined(__has_feature)
1230+# if __has_feature(memory_sanitizer)
1231+# define IUTEST_HAS_MEMORY_SANITIZER 1
1232+# endif
1233+# endif
1234+#endif
12271235
1236+#if !defined(IUTEST_HAS_MEMORY_SANITIZER)
1237+# define IUTEST_HAS_MEMORY_SANITIZER 0
1238+#endif
1239+
1240+#if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY)
1241+# if IUTEST_HAS_MEMORY_SANITIZER
1242+# if defined(__clang__)
1243+# define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory")))
1244+# elif defined(__GNUC__) && !defined(COMPILER_ICC)
1245+# define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory")))
1246+# endif
1247+# endif
1248+#endif
1249+
1250+#if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY)
1251+# define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY
1252+#endif
1253+
1254+
12281255 // workaround
12291256 /**
12301257 * @private
--- trunk/test/uninitialize_tests.cpp (revision 1310)
+++ trunk/test/uninitialize_tests.cpp (revision 1311)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2012-2016, Takazumi Shirayanagi\n
9+ * Copyright (C) 2012-2018, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -29,7 +29,14 @@
2929 {
3030 (void)argc;
3131 (void)argv;
32- if( IUTEST_RUN_ALL_TESTS() == 0 ) return 1;
32+ if( IUTEST_RUN_ALL_TESTS() == 0 )
33+ {
34+#if !defined(IUTEST_USE_GTEST)
35+ return 1;
36+#else
37+ printf("googletest latest is behavior changed...\n");
38+#endif
39+ }
3340 printf("*** Successful ***\n");
3441 return 0;
3542 }
Show on old repository browser