<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 1:20 AM, Bill Wendling <span dir="ltr"><<a href="mailto:bwendling@apple.com" target="_blank">bwendling@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Feb 12, 2013, at 4:41 AM, Alexander Potapenko <<a href="mailto:glider@google.com">glider@google.com</a>> wrote:<br>
<br>
> Author: glider<br>
> Date: Tue Feb 12 06:41:12 2013<br>
> New Revision: 174964<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=174964&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=174964&view=rev</a><br>
> Log:<br>
> [ASan] Do not use kDefaultShort64bitShadowOffset on Mac, where the binaries may get mapped at 0x100000000+ and thus may interleave with the shadow.<br>
><br>
> Modified:<br>
> llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
><br>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=174964&r1=174963&r2=174964&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=174964&r1=174963&r2=174964&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Tue Feb 12 06:41:12 2013<br>
> @@ -202,6 +202,7 @@ static ShadowMapping getShadowMapping(co<br>
> bool ZeroBaseShadow) {<br>
> llvm::Triple TargetTriple(M.getTargetTriple());<br>
> bool IsAndroid = TargetTriple.getEnvironment() == llvm::Triple::Android;<br>
> + bool IsMacOSX = TargetTriple.getOS() == llvm::Triple::MacOSX;<br>
> bool IsPPC64 = TargetTriple.getArch() == llvm::Triple::ppc64;<br>
> bool IsX86_64 = TargetTriple.getArch() == llvm::Triple::x86_64;<br>
><br>
> @@ -215,7 +216,7 @@ static ShadowMapping getShadowMapping(co<br>
> Mapping.Offset = (IsAndroid || ZeroBaseShadow) ? 0 :<br>
> (LongSize == 32 ? kDefaultShadowOffset32 :<br>
> IsPPC64 ? kPPC64_ShadowOffset64 : kDefaultShadowOffset64);<br>
> - if (!ZeroBaseShadow && ClShort64BitOffset && IsX86_64) {<br>
> + if (!ZeroBaseShadow && ClShort64BitOffset && IsX86_64 && !IsMacOSX) {<br>
> assert(LongSize == 64);<br>
> Mapping.Offset = kDefaultShort64bitShadowOffset;<br>
> } if (!ZeroBaseShadow && ClMappingOffsetLog >= 0) {<br>
><br>
</div></div>This 'if' here is on the same line as the previous '}'. Is that intended? or is there a missing 'else' here?<br></blockquote><div><br></div><div style>The code is correct, but the indentation is confusing. </div>
<div style>Fixed in r175033. Thanks!</div><div style><br></div><div style>--kcc </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><font color="#888888"><br>
-bw<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>