<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 5, 2015 at 4:30 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</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">I'm curious why you don't use the existing CFL-AA implementation?<br>Or is this just an experiment/learning experience/whatever?</div></blockquote><div><br></div><div>The issue came up as part of me trying out some AA ideas that have no prayer of getting into the mainline LLVM.  But in addition to that, now I'm troubled by the mere fact that I don't know the answer :)</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 class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Nov 5, 2015 at 1:00 PM, Christian Convey via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</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">I'm working on an AA implementation, and I'm using abstract blocks to model the memory used to store the values of program variables.  <div><br></div><div>To be sound my analysis must ensure that all program objects which <i>might possibly</i> occupy the same chunk of runtime memory are modeled with the same abstract memory block.  I'm trying to understand if "external" linkage is a problem for me.</div><div><br></div><div>More concretely, suppose I have a Module which includes these declarations:</div><div><div>@Bar = external global i32</div><div>@Foo = external global i32</div></div><div><br></div><div>Is there any reasonable possibility that the linker will cause @Bar and @Foo to name the same piece of runtime memory?</div><div></div></div></blockquote><div><br></div></span><div>Do you want "what's legal in some particular language" or "what may ever happen"?<br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I guess both answers are interesting.  Pragmatically speaking, I need an answer that's pretty trustworthy for any not-intentionally-evil C or C++ code compiled by clang 3.7+, and linked with the GNU linker on a modern Linux distro, on x86-64.</div><div class="gmail_extra"><br></div><div class="gmail_extra">But I'm also curious if there's something in the LLVM IR spec or ELF spec that should have given me the answer.  I couldn't tell if such docs don't exist, or if my Google-fu was too weak to find the answer.</div><div class="gmail_extra"><br></div></div>