This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Copy libsanitizer from llvm at revision 167890
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "David S. Miller" <davem at redhat dot com>
- Date: Wed, 14 Nov 2012 13:36:23 +0100
- Subject: Re: [PATCH] Copy libsanitizer from llvm at revision 167890
- References: <20121114122609.GA9465@gmail.com>
"H.J. Lu" <hjl.tools@gmail.com> writes:
> diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
> index ea7ee9e..5c52ddc 100644
> --- a/libsanitizer/asan/asan_linux.cc
> +++ b/libsanitizer/asan/asan_linux.cc
> @@ -1,5 +1,7 @@
> //===-- asan_linux.cc -----------------------------------------------------===//
> //
> +// The LLVM Compiler Infrastructure
> +//
> // This file is distributed under the University of Illinois Open Source
> // License. See LICENSE.TXT for details.
> //
> @@ -66,20 +68,6 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
> *pc = ucontext->uc_mcontext.gregs[REG_EIP];
> *bp = ucontext->uc_mcontext.gregs[REG_EBP];
> *sp = ucontext->uc_mcontext.gregs[REG_ESP];
> -# elif defined(__sparc__)
> - ucontext_t *ucontext = (ucontext_t*)context;
> - uptr *stk_ptr;
> -# if defined (__arch64__)
> - *pc = ucontext->uc_mcontext.mc_gregs[MC_PC];
> - *sp = ucontext->uc_mcontext.mc_gregs[MC_O6];
> - stk_ptr = (uptr *) (*sp + 2047);
> - *bp = stk_ptr[15];
> -# else
> - *pc = ucontext->uc_mcontext.gregs[REG_PC];
> - *sp = ucontext->uc_mcontext.gregs[REG_O6];
> - stk_ptr = (uptr *) *sp;
> - *bp = stk_ptr[15];
> -# endif
> #else
> # error "Unsupported arch"
> #endif
I don't think removing this code is desirable. As discussed, there
needs to be one of the libsanitizer maintainers who takes care of
porting changes from the GCC side to upstream and importing upstream, as
Ian does for libgo.
Btw., is there some kind of libsanitizer porting guide, or is one
supposed to figure this out on one's own?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University