<div dir="ltr">Sorry, I sent the original message to the wrong list.<div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Gábor Horváth</b> <span dir="ltr"><<a href="mailto:xazax.hun@gmail.com">xazax.hun@gmail.com</a>></span><br>Date: 18 August 2015 at 12:59<br>Subject: Re: r244416 - [modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.<br>To: Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>><br>Cc: "<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>" <<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>><br><br><br><div dir="ltr">Hi!<div><br></div><div>In <span style="font-family:'Helvetica Neue';font-size:12px">r244416</span><span style="font-family:'Helvetica Neue';font-size:12px"> you made </span>createModuleManager to call the Initialize method of the ASTConsumer.</div><div>Because of this change the ASTConsumer::Initialize might be called twice in some scenarios.</div><div><br></div><div>This change makes the Static Analyzer crash (use after free) in those scenarios. I think most of the ASTConsumers was not written with that in mind Initialize might be called twice for the object. This fact is also not covered by the documentation.</div><div><br></div><div>In my opinion we should either guarantee that the Initialize method will be called only once during the lifetime of an ASTConsumer, or document the fact that, it might be called multiple times and notify the authors of the different consumers to update their classes accordingly (announcement on the mailing list?).</div><div><br></div><div>What do you think?</div><div><br></div><div>Regards,</div><div>Gabor Horvath</div><div><br></div></div>
</div><br></div></div>