r<span style>147326</span><div><font color="#222222" face="arial, sans-serif">This slightly different, but the idea is the same. I'm glad to get rid of getenv. <br></font><br><div class="gmail_quote">On Wed, Dec 28, 2011 at 4:43 AM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@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 class="HOEnZb"><div class="h5">On Wed, Dec 28, 2011 at 3:08 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>

> I'd prefer something different:<br>
><br>
> - Don't put this into sysinfo/sysinfo.cc (we don't use it in some settings,<br>
> also we may want to get rid of it eventually).<br>
> - I suggest we implement ReadProcSelfEnviron in asan_rtl.cc and then use it<br>
> to implement asan_getenv() in asan_linux.cc (and in asan_mac.cc, if needed).<br>
> - no need for PLATFORM_WINDOWS section (yet). Such code will need to go to<br>
> asan_windows.cc once we have it.<br>
> - we want to avoid memchr/memcmp/etc (use __internal* variants).<br>
> - don't fallback to libc, just do ASAN_DIE<br>
> - do we need HAVE___ENVIRON section?<br>
><br>
> --kcc<br>
><br>
> On Wed, Dec 21, 2011 at 3:57 AM, Evgeniy Stepanov<br>
> <<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> this patch brings in the implementation of GetenvBeforeMain() from<br>
>> google-perftools and uses it in place of getenv(). This is required to<br>
>> call __asan_init from .preinit_array.<br>
><br>
><br>
</div></div></blockquote></div><br></div>