<div dir="ltr">Sounds reasonable to me if there're no other subtitles to worry about.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 5:29 PM Karl Rehm <<a href="mailto:klrehm123@gmail.com">klrehm123@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Interesting, so I guess we can check for whether it's an array type and adjust accordingly instead? Blocking *all* global variables without definitive initializers feels a bit much to me, especially if they have primitive types (i.e. integers) that don't have the potential to be screwed around with like this.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 8:14 PM George Burgess IV <<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Looks like the commit that added that was <a href="https://github.com/llvm/llvm-project/commit/16e42128c24f5df8a61cfd2e6cdf3bd3966db0c5" target="_blank">https://github.com/llvm/llvm-project/commit/16e42128c24f5df8a61cfd2e6cdf3bd3966db0c5</a> . A reduced example might look something like this: <a href="https://godbolt.org/z/r4G_g-" target="_blank">https://godbolt.org/z/r4G_g-</a></div><div dir="ltr"><br></div><div>At the C source level, static object size detection has to be similarly conservative in the face of 'variable-length' structs like `struct my_string { size_t size; char data[0]; };`, though I don't know how relevant that is here.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 28, 2020 at 11:41 PM Karl Rehm via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>In this function (used to check the size of a global) there is an initial check for whether the initializer to this function is "definitive." My question is: why do we need this? How does the object's size change if a global's initializer is defined at link time?<br></div><div><br></div><div>Thanks,</div><div>Karl<br></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>