<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 15, 2017, at 01:20, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">Okay. That's certainly a separate discussion. For the purpose of this question I mean null as zero. Can you have dereferenceable pointers, with a value of zero when converted to an integer, in that address space? Or are you interested only in saying that alloca never produces pointers with a value of zero when converted to an integer?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""></div></blockquote></div><br class=""><div class="">I think this is the problem we actually want to be solving. On AMDGPU the stack grows up and naturally begins at 0. 0 is a valid, dereferencable pointer. We have a workaround now where we won’t allocate a user object at offset 0, but that’s mostly just because before when alloca had to be in the default address space this was required. I would rather not do the work to push this back in that direction. The point of this patch originally I thought was to fix tests which are comparing against null pointers. We really want them to be checking against the true invalid pointer value.</div><div class=""><br class=""></div><div class="">-Matt</div></body></html>