<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 14, 2014 at 7:29 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey all,<div><br></div><div>Regarding this bug:</div><div><a href="http://llvm.org/bugs/show_bug.cgi?id=20658" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=20658</a></div>
<div><br></div><div>We've been discussing the idea of having ASLR disabled by default when launching processes within lldb.  Currently it looks like the default behavior is to have it enabled, and require explicitly disabling to get that behavior for the process.</div>

<div><br></div><div>It seems like it might make more sense to have it disabled by default - that way code references would likely be static across debugger runs, which seems to be more what we want when tracking down issues across code runs.</div>

<div><br></div><div>Any thoughts on this?</div></div></blockquote><div><br></div><div>My strong preference: disable ASLR by default.</div><div><br></div><div>1) It matches the behavior of most debuggers today.</div><div>
2) There are not many options when a bug vanishes under the debugger: ASLR, threading interactions, or ptrace behavior changes (or equivalent on any other platform). I don't think this is hard for someone to realize.</div>
<div><br></div><div>Also, please fix the spelling of the flag here. '--disable-aslr=False' would be... a really terrible interface. ;]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>The counterargument I could make for changing it would be (aside from legacy compatibility issues perhaps on the MacOSX/iOS side) - taking the exe out of its native state on the OS.  If a bug is ASLR sensitive, the user might miss it.  And so behavior in the debugger could differ from the exe in its native state.  Not sure how relevant that is for the majority of usages, though.</div>
</div></blockquote><div><br></div><div>I think this is both rare and easy to diagnose as indicated above.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div><br></div><div>I'll be fixing the fact that Linux is ignoring this altogether.  But while I'm in there, I could flip the default if we wanted to do it.  If not globally, we'd probably pursue defaulting it on Linux (and Ed seems to like it for FreeBSD as well, so maybe for not Apple in that case?)</div>
</div></blockquote></div><br>Thanks!</div></div>