<p dir="ltr">Ok, this is convincing. LGTM</p>
<div class="gmail_quote">On Mar 29, 2013 10:36 PM, "Sergey Matveev" <<a href="mailto:earthdok@google.com">earthdok@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  > can you use sizeof(user_regs_struct) instead of RegisterCount()?<br>
<br>
  Since we're passing an array of uptrs, I think it makes more sense to talk in terms of array's length rather than its size in bytes. But I can change that if it's bothering you.<br>
<br>
  > why do you need to extract SP separately here?<br>
<br>
  Because LSan needs to know the stack pointer (to distinguish between live and stale stack regions) but can't know its index in the array.<br>
<br>
  I guess we could make a convention to put it at index 0, but explicit is better than implicit, right?<br>
<br>
  Also, if we decided to filter out some registers like you suggest, the array wouldn't contain the SP anymore (since it doesn't normally point into heap).<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D593" target="_blank">http://llvm-reviews.chandlerc.com/D593</a><br>
</blockquote></div>