+rich...@metafoo.co.uk On Thu, Jun 6, 2013 at 12:21 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Jun 06, 2013 at 11:46:19AM +0400, Konstantin Serebryany wrote: >> If we are going to import the ubsan run-time from LLVM's >> projects/compiler-rt/lib/ubsan, >> we may also need to update the contents of >> libsanitizer/sanitizer_common and keep them in sync afterwards. >> (ubsan shares few bits of code with asan/tsan/msan) >> The simplest way to do that is to extend libsanitizer/merge.sh > > Sure. I've done so far just a partial merge by hand (only 3 changed files > for the minimum of changes required to get ubsan to build), and have tested > just > that it compiles, not that libubsan actually works. > > P1 patch is the toplevel stuff to add ubsan into GCC libsanitizer, plus > ubsan/Makefile* and ubsan/libtool-version (i.e. gcc owned files).
The trivial patch to merge.sh is ok. The partial merge is ok if it doesn't break asan/tsan build. > P2 is the actual merge of the ubsan files. Ok too. > P3 is something I'd propose for ubsan upstream, without it g++ warns about > __int128 in -pedantic mode. Looks good. rich...@metafoo.co.uk, do you agree to apply this upstream? ubsan/ubsan_value.h: -typedef __int128 s128; -typedef unsigned __int128 u128; +__extension__ typedef __int128 s128; +__extension__ typedef unsigned __int128 u128; --kcc > > Jakub