<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 August 2017 at 03:27, Diana Picus via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Strangely enough, it turns out that if I run<br>
Asan-armhf-with-calls-Noinst-<wbr>Test on the command line it fails,<br>
although it doesn't fail when run with lit.</blockquote><div><br></div><div>Looks like the crash is within the "use_colors == true" portion of ColoredPrintf, so this would make sense if running the test within lit turns off color support (perhaps because the output is not a terminal).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've attached the stack<br>
trace from gdb. It looks like some trouble passing down va_arg<br>
parameters, but I haven't looked into too much details. The segfault<br>
happens when we try to do a   ldrb   r3, [r0, r1], with r1 set to 0 by<br>
the current function and r0 passed down from the caller. I'm not sure<br>
if this is the exact same problem as the other tests, but feel free to<br>
have a look at that code.<br></blockquote><div><br></div><div>Have you tried running Asan-armhf-with-calls-Noinst-Test on the command line without this patch applied? (It's possible that this is a pre-existing bug in ARM varargs call lowering, and is unrelated to the bug we're trying to track down. This code path performs an unrelated varargs call between a va_start / va_end pair, which seems like quite a rare situation, and I could easily believe there's something wrong with our lowering that allows some portion of the outer va_list state to be clobbered in that scenario.)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Meanwhile, I've removed some clutter from Asan-armhf-with-calls-Test<br>
(which is the original failure that we were seeing) and left only one<br>
failing test that seemed small enough. I'll try to look at the<br>
disassembly before/after the patch and maybe even run valgrind on it<br>
(running it on the original binary naturally takes forever).<br>
<br>
Let me know if there's anything else I could try. I can also send you<br>
disassembly or even LLVM IR for the Asan-armhf-with-calls-Noinst-<wbr>Test<br>
if you think it helps.<br>
<br>
Cheers,<br>
Diana</blockquote></div></div></div>