On 07/11/16 11:39, Jakub Jelinek wrote:
On Mon, Nov 07, 2016 at 11:22:28AM +0300, Maxim Ostapenko wrote:
this patch set performs libsanitizer merge from upstream.

Patch 1 is the library merge itself.

Patch 2 is the reapplied change for SPARC by David S. Miller.

Patch 3 changes heuristic for extracting last PC from stack frame for ARM in
fast unwind routine. More details can be found here
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61771).

Patch 4 replaces Jakub's fix for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63888 and removes
CheckODRViolationViaPoisoning call from RegisterGlobal to avoid false
positive odr violation reports.

Patch 5 combines necessary compiler changes.

Patch 6 adds several new tests, backported from upstream.

Patch 7 adds support for ASan odr indicators at compiler side.

The whole patch set was regtested/bootstrapped/ASan bootstrapped on
x86_64-unknown-linux-gnu and i386-unknown-linux-gnu.
Also, passed regression tests on arm-linux-gnueabi and aarch64-linux under
QEMU.
So, libasan.so.* is again ABI incompatible, but libtsan and libubsan stay
(hopefully) backwards ABI compatible?


libubsan is definitely compatible.
For libtsan we have several changes:

1) Several interceptors (34 of them) were added and __interceptor_lstat{64} were removed.
2) __interceptor_strchr has change in its parameters type:
__interceptor_strchr(char*, int) -> __interceptor_strchr(const char*, int)
3) tsan's internal type __tsan::ReportDesc has several changes, but it seems that this doesn't introduce ABI incompatibility with compiler side.

Full abidiff listing is attached.

So, I suppose libtsan is also compatible.

-Maxim


        Jakub




Functions changes summary: 4 Removed, 3 Changed (70 filtered out), 34 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 0 Removed, 10 Added function symbols not referenced by debug info
Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info

4 Removed functions:

  'function int __interceptor_lstat(const char*, void*)'    {lstat, aliases __interceptor_lstat}
  'function int __interceptor_lstat64(const char*, void*)'    {lstat64, aliases __interceptor_lstat64}
  'function int __interceptor_stat(const char*, void*)'    {__interceptor_stat, aliases stat}
  'function int __interceptor_stat64(const char*, void*)'    {stat64, aliases __interceptor_stat64}

34 Added functions:

  'function char* __interceptor_ctermid(char*)'    {__interceptor_ctermid, aliases ctermid}
  'function int __interceptor_epoll_pwait(int, void*, int, int, void*)'    {epoll_pwait, aliases __interceptor_epoll_pwait}
  'function int __interceptor_eventfd_read(int, __sanitizer::u64*)'    {eventfd_read, aliases __interceptor_eventfd_read}
  'function int __interceptor_eventfd_write(int, __sanitizer::u64)'    {__interceptor_eventfd_write, aliases eventfd_write}
  'function void* __interceptor_memmem(SIZE_T, SIZE_T)'    {__interceptor_memmem, aliases memmem}
  'function int __interceptor_pthread_sigmask(int, const __sanitizer::__sanitizer_sigset_t*, __sanitizer::__sanitizer_sigset_t*)'    {__interceptor_pthread_sigmask, aliases pthread_sigmask}
  'function SSIZE_T __interceptor_recvfrom(int, void*, SIZE_T, int, void*, int*)'    {__interceptor_recvfrom, aliases recvfrom}
  'function SSIZE_T __interceptor_sendto(int, void*, SIZE_T, int, void*, int)'    {__interceptor_sendto, aliases sendto}
  'function int __interceptor_sigblock(int)'    {sigblock, aliases __interceptor_sigblock}
  'function int __interceptor_sigsetmask(int)'    {sigsetmask, aliases __interceptor_sigsetmask}
  'function SIZE_T __interceptor_strnlen(const char*, SIZE_T)'    {__interceptor_strnlen, aliases strnlen}
  'function int __interceptor_ttyname_r(int, char*, SIZE_T)'    {__interceptor_ttyname_r, aliases ttyname_r}
  'function void __sanitizer_cov_trace_pc_guard_init()'    {__sanitizer_cov_trace_pc_guard_init}
  'function int __sanitizer_install_malloc_and_free_hooks(void (typedef __sanitizer::uptr)*, void ()*)'    {__sanitizer_install_malloc_and_free_hooks}
  'function void __sanitizer_set_report_fd(void*)'    {__sanitizer_set_report_fd}
  'function void __sanitizer_symbolize_global(__sanitizer::uptr, const char*, char*, __sanitizer::uptr)'    {__sanitizer_symbolize_global}
  'function void __sanitizer_symbolize_pc(__sanitizer::uptr, const char*, char*, __sanitizer::uptr)'    {__sanitizer_symbolize_pc}
  'function void __sanitizer_syscall_post_impl_rt_sigaction(long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T)'    {__sanitizer_syscall_post_impl_rt_sigaction}
  'function void __sanitizer_syscall_post_impl_sigaction(long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*)'    {__sanitizer_syscall_post_impl_sigaction}
  'function void __sanitizer_syscall_pre_impl_rt_sigaction(long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T)'    {__sanitizer_syscall_pre_impl_rt_sigaction}
  'function void __sanitizer_syscall_pre_impl_sigaction(long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*)'    {__sanitizer_syscall_pre_impl_sigaction}
  'function void __tsan::__tsan_on_report(const __tsan::ReportDesc*)'    {__tsan_on_report}
  'function bool __tsan::__tsan_symbolize_external(__sanitizer::uptr, char*, __sanitizer::uptr, char*, __sanitizer::uptr, int*, int*)'    {__tsan_symbolize_external}
  'function const char* __tsan_default_suppressions()'    {__tsan_default_suppressions}
  'function void* __tsan_get_current_report()'    {__tsan_get_current_report}
  'function int __tsan_get_report_data(void*, const char**, int*, int*, int*, int*, int*, int*, int*, void**, __sanitizer::uptr)'    {__tsan_get_report_data}
  'function int __tsan_get_report_loc(void*, __sanitizer::uptr, const char**, void**, __sanitizer::uptr*, __sanitizer::uptr*, int*, int*, int*, void**, __sanitizer::uptr)'    {__tsan_get_report_loc}
  'function int __tsan_get_report_mop(void*, __sanitizer::uptr, int*, void**, int*, int*, int*, void**, __sanitizer::uptr)'    {__tsan_get_report_mop}
  'function int __tsan_get_report_mutex(void*, __sanitizer::uptr, __sanitizer::uptr*, void**, int*, void**, __sanitizer::uptr)'    {__tsan_get_report_mutex}
  'function int __tsan_get_report_stack(void*, __sanitizer::uptr, void**, __sanitizer::uptr)'    {__tsan_get_report_stack}
  'function int __tsan_get_report_thread(void*, __sanitizer::uptr, int*, __sanitizer::uptr*, int*, const char**, int*, void**, __sanitizer::uptr)'    {__tsan_get_report_thread}
  'function int __tsan_get_report_unique_tid(void*, __sanitizer::uptr, int*)'    {__tsan_get_report_unique_tid}
  'function void __tsan_testonly_barrier_init(__sanitizer::u64*, __sanitizer::u32)'    {__tsan_testonly_barrier_init}
  'function void __tsan_testonly_barrier_wait(__sanitizer::u64*)'    {__tsan_testonly_barrier_wait}

3 functions with some indirect sub-type change:

  [C]'function void* __interceptor_memmove(void*, void*, __sanitizer::uptr)' has some indirect sub-type changes:
    Please note that the symbol of this function is memmove
     and it aliases symbol: __interceptor_memmove
    parameter 2 of type 'void*' changed:
      entity changed from 'void*' to 'typedef __sanitizer::uptr'
    parameter 3 of type 'typedef __sanitizer::uptr' was removed


  [C]'function char* __interceptor_strchr(char*, int)' has some indirect sub-type changes:
    Please note that the symbol of this function is __interceptor_strchr
     and it aliases symbol: strchr
    parameter 1 of type 'char*' changed:
      in pointed to type 'char':
        entity changed from 'char' to 'const char'

  [C]'function bool __tsan::OnReport(const __tsan::ReportDesc*, bool)' has some indirect sub-type changes:
    parameter 1 of type 'const __tsan::ReportDesc*' has sub-type changes:
      in pointed to type 'const __tsan::ReportDesc':
        in unqualified underlying type 'class __tsan::ReportDesc':
          2 data member changes (1 filtered):
           type of '__tsan::ReportType __tsan::ReportDesc::typ' changed:
             1 enumerator insertion:
               '__tsan::ReportType::ReportTypeMutexInvalidAccess' value '7'

             6 enumerator changes:
               '__tsan::ReportType::ReportTypeMutexBadUnlock' from value '7' to '8'
               '__tsan::ReportType::ReportTypeMutexBadReadLock' from value '8' to '9'
               '__tsan::ReportType::ReportTypeMutexBadReadUnlock' from value '9' to '10'
               '__tsan::ReportType::ReportTypeSignalUnsafe' from value '10' to '11'
               '__tsan::ReportType::ReportTypeErrnoInSignal' from value '11' to '12'
               '__tsan::ReportType::ReportTypeDeadlock' from value '12' to '13'


           type of '__tsan::Vector<__tsan::ReportLocation*> __tsan::ReportDesc::locs' changed:
             1 data member changes (2 filtered):
              type of '__tsan::ReportLocation** __tsan::Vector<__tsan::ReportLocation*>::begin_' changed:
                in pointed to type '__tsan::ReportLocation*':
                  in pointed to type 'struct __tsan::ReportLocation':
                    type size changed from 704 to 832 bits
                    7 data member changes:
                     type of '__sanitizer::DataInfo __tsan::ReportLocation::global' changed:
                       type size changed from 320 to 448 bits
                       2 data member insertions:
                         'char* __sanitizer::DataInfo::file', at offset 128 (in bits)
                         '__sanitizer::uptr __sanitizer::DataInfo::line', at offset 192 (in bits)
                       3 data member changes:
                        'char* __sanitizer::DataInfo::name' offset changed from 128 to 256 (in bits)
                        '__sanitizer::uptr __sanitizer::DataInfo::start' offset changed from 192 to 320 (in bits)
                        '__sanitizer::uptr __sanitizer::DataInfo::size' offset changed from 256 to 384 (in bits)

                     '__sanitizer::uptr __tsan::ReportLocation::heap_chunk_start' offset changed from 384 to 512 (in bits)
                     '__sanitizer::uptr __tsan::ReportLocation::heap_chunk_size' offset changed from 448 to 576 (in bits)
                     'int __tsan::ReportLocation::tid' offset changed from 512 to 640 (in bits)
                     'int __tsan::ReportLocation::fd' offset changed from 544 to 672 (in bits)
                     'bool __tsan::ReportLocation::suppressable' offset changed from 576 to 704 (in bits)
                     '__tsan::ReportStack* __tsan::ReportLocation::stack' offset changed from 640 to 768 (in bits)





10 Added function symbols not referenced by debug info:

  __sanitizer_cov_trace_cmp1
  __sanitizer_cov_trace_cmp2
  __sanitizer_cov_trace_cmp4
  __sanitizer_cov_trace_cmp8
  __sanitizer_cov_trace_div4
  __sanitizer_cov_trace_div8
  __sanitizer_cov_trace_gep
  __sanitizer_cov_trace_pc_guard
  __sanitizer_cov_trace_pc_indir
  internal_sigreturn

Reply via email to