<div dir="ltr"><div>This is quite strange, but UBSAN_OPTIONS are not visible (i.e., getEnv("UBSAN_OPTIONS") returns null) even when all Chrome sandboxes are disabled. So I suppose this is related to the Chrome's multi-process running model involving Zygote (i.e., UBsan init has to be executed from the Zygote process, not one of Zygote's child processes. However, all of rendering processes are running as a child process of the Zygote process while the Zygote process may wipe out all environment variables.). If the initialization is done at the very early running phase, UBsan can read UBSAN_OPTIONS though.</div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 12:29 AM, Byoungyoung Lee <span dir="ltr"><<a href="mailto:byoungyoung@google.com" target="_blank">byoungyoung@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">Thanks Alexey for turning my sloppy patch into way better one! <div><br></div><div>Yes, I was calling the InitializeSanitizerCommon() in the early phase to initialize UBSan before the Chrome sandbox kick in. As I tried Clang ToT today, I found another issue that UBSAN_OPTIONS was not visible in InitializeSanitizerCommon() for Chrome (I suspect this is also related to the Chrome sandboxing, but haven't verified yet). Please let me try more tomorrow.</div>

<div><br></div><div>Thanks,</div><div>Byoungyoung<br><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 12:01 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.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">I've incorporated your patch into r213783. Now if you want to see stack traces in vptr checker, but don't want to run online symbolization you can provide UBSAN_OPTIONS="symbolize=0 print_stacktrace=1". Let me know if you're OK with this change. One thing that wasn't submitted is call to InitializeSanitizerCommon() early in __ubsan_handle_dynamic_type_cache_miss (before we even check for duplicated report or for cache miss). It would be really costly and weird to add initialization at this place. I assume that you're trying to initialize UBSan as early as possible in presence of Chromium sandbox. Is that right?</div>


<div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 8:53 AM, Byoungyoung Lee <span dir="ltr"><<a href="mailto:byoungyoung@google.com" target="_blank">byoungyoung@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">Thank you Alexey!</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 22, 2014 at 6:24 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FYI I'm working on a slightly modified version of this patch. Will update this thread tomorrow.<br>
<br>
<a href="http://reviews.llvm.org/D4410" target="_blank">http://reviews.llvm.org/D4410</a><br>
<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>


</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>