[plain text] On Wed, May 14, 2014 at 2:42 AM, Andrew Pinski <pins...@gmail.com> wrote: > On Mon, May 12, 2014 at 4:20 AM, Konstantin Serebryany > <konstantin.s.serebry...@gmail.com> wrote: >> This is the first libsanitizer merge in 4.10 (the last merge was in >> December 2013). >> >> Tested on Ubuntu 12.04 like this: >> rm -rf */{*/,}libsanitizer && make -j 50 >> make -j 40 -C gcc check-g{cc,++} >> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} asan.exp' && \ >> make -j 40 -C gcc check-g{cc,++} >> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} tsan.exp' && \ >> make -j 40 -C gcc check >> RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} ubsan.exp' && \ >> echo PASS >> >> 5 months' worth of changes may break any platform we are not testing >> ourselves >> (that includes Ubuntu 12.04, 13.10, 14.04, Mac 10.9, Windows 7, Android ARM), >> please help us test this patch on your favorite platform. > > One theme I have been noticing in the libsanitizer code is that it has > all of the knowledge of glibc when it comes to syscalls but makes some > bad assumptions dealing with some structures. For an example on MIPS > n64: stat and stat64 are different layout between user and kernel. > Don't ask, it is a historical mistake. > > Also it really forces target maintainers to maintain both glibc and > libsanitizer code. ILP32 on aarch64 has some similar issues as x32 > and MIPS n32. > Even Linus is pushing new 32bit targets to go the route of 64bit time > which is means libsanitizer code becomes even more complex. This is indeed a PITA. It is caused by our need to avoid even greater PITA of including system headers into the sanitizer files (we allow system #includes only in a handful of files). > > Is there a way to reduce this maintenance overhead? Can we please > split the target specific structures out to a header file which can > then be included. This will reduce the overall messy #if's all of the > code and help to add new targets.
The problem is far from trivial. I will be more than happy to receive help in form of patches. --kcc > > Thanks, > Andrew Pinski > > >> >> Expected ChangeLog entries: >> =============== gcc/testsuite/ChangeLog >> 2014-05-XX Kostya Serebryany <k...@google.com> >> >> * c-c++-common/tsan/mutexset1.c: Update the test to match >> upstream r208536. >> * g++.dg/asan/symbolize-callback-1.C: Delete the deprecated test. >> >> =============== libsanitizer/ChangeLog >> 2014-05-XX Kostya Serebryany <k...@google.com> >> >> * All source files: Merge from upstream r208536. >> * asan/Makefile.am (asan_files): Added new files. >> * asan/Makefile.in: Regenerate. >> * tsan/Makefile.am (tsan_files): Added new files. >> * tsan/Makefile.in: Regenerate. >> * sanitizer_common/Makefile.am (sanitizer_common_files): Added >> new files. >> * sanitizer_common/Makefile.in: Regenerate. >> >> --kcc