[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 13:26:41 PST 2016


benlangmuir added a comment.

> Does it mean that a system module should only import system modules? If a system module is allowed to import non-system modules, for a non-system module, we will validate diagnostic options differently depending on whether a system module or a non-system module imports it. This will cause a non-system module that was validated earlier to be invalidated by a child thread.

It seems like we should validate the options the same way regardless of what the importer is, but I'm guessing this was done for a reason... What's the behaviour of a user-header imported by a system header (without modules)?  If the user header warnings show up even without -Wsystem-headers, then we should be okay validating, right?


https://reviews.llvm.org/D25916





More information about the cfe-commits mailing list