[compiler-rt] r260046 - Fix build on FreeBSD after r259741.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 11:11:56 PST 2016
thanks!
On Sun, Feb 7, 2016 at 9:40 AM, Dimitry Andric via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: dim
> Date: Sun Feb 7 11:40:45 2016
> New Revision: 260046
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260046&view=rev
> Log:
> Fix build on FreeBSD after r259741.
>
> On FreeBSD, the uc_mcontext member of ucontext_t has a member called
> mc_err, which corresponds to the Linux member gregs[REG_ERR].
>
> Reviewed by: rdivacky at FreeBSD.org
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=260046&r1=260045&r2=260046&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Sun Feb 7
> 11:40:45 2016
> @@ -1158,7 +1158,11 @@ void internal_join_thread(void *th) {}
> bool GetSigContextWriteFlag(void *context) {
> #if defined(__x86_64__) || defined(__i386__)
> ucontext_t *ucontext = (ucontext_t*)context;
> +#if SANITIZER_FREEBSD
> + return ucontext->uc_mcontext.mc_err & 2;
> +#else
> return ucontext->uc_mcontext.gregs[REG_ERR] & 2;
> +#endif
> #else
> return false; // FIXME: Implement.
> #endif
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160208/3980229f/attachment.html>
More information about the llvm-commits
mailing list