<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 12:21 AM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> writes:<br>
> On Tue, Jun 30, 2015 at 9:40 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
>     Author: bogner<br>
>     Date: Tue Jun 30 23:40:10 2015<br>
>     New Revision: 241140<br>
><br>
>     URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D241140-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=qS10UcEisS-h9gxsE6JqDoxzGsztjbGmPA_PE49MYzc&s=76WYzvQ7N44y7kPfC5wrPM_-d23IGUBhkL8TS0JyNFE&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=241140&view=rev</a><br>
>     Log:<br>
>     -frewrite-includes: Rework how includes and modules are differentiated<br>
><br>
>     The map of FileChange structs here was storing two disjoint types of<br>
>     information:<br>
><br>
>     1. A pointer to the Module that an #include directive implicitly<br>
>        imported<br>
><br>
>     2. A FileID and FileType for an included file. These would be left<br>
>        uninitialized in the Module case.<br>
><br>
>     This change splits these two kinds of information into their own maps,<br>
>     which both simplifies how we access either and avoids the undefined<br>
>     behaviour we were hitting due to the uninitialized fields in the<br>
>     included file case.<br>
><br>
>     Mostly NFC, but fixes some errors found by self-host with ubsan.<br>
><br>
> Ideally it'd be nice to have those test cases reduced and committed, so they<br>
> can be found/verified/etc without a full selfhost build later on.<br>
<br>
</span>I worded this poorly - the errors were in the test suite (in<br>
Frontend/rewrite-includes-missing.c) when running check-clang with a<br>
self-hosted clang with ubsan enabled.<br></blockquote><div><br></div><div>Ah, so an UBSan bot/anyone developing with UBSan enabled would've caught this - sounds good. Thanks!</div><div> </div></div><br></div></div>