forked from checkedc/checkedc-clang
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit struct _GUID
on Windows crashes DeclRewriter::detectInlineStruct
#448
Comments
mattmccutchen-cci
added
the
windows failure
A bug causing a Windows-specific failure in the regression tests
label
Feb 25, 2021
I don't know any more than you've written here, so I vote 1. Maybe 2 with some structs if you have further reason to believe there will be a conflict with code. But 3 is too expensive and 4 catches problems too late. |
Option 1 sounds good. Thanks Kyle. PR coming soon. |
mattmccutchen-cci
added a commit
that referenced
this issue
Feb 26, 2021
locations. Avoids a crash when an implicit `struct _GUID` is injected with an invalid source location on Windows (fixes #448).
mattmccutchen-cci
removed
the
windows failure
A bug causing a Windows-specific failure in the regression tests
label
Feb 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default on Windows, Clang 11 injects an implicit
struct _GUID
declaration into every translation unit; this is new since Clang 9. This declaration has an invalid source location, so it causes an assertion failure in DeclRewriter::detectInlineStruct in 129 of our regression tests. We should probably just skip inline struct detection if the struct source location is invalid.While the
struct _GUID
injection is enabled by default only on Windows, we can enable it on other OSes for testing purposes using the-fms-extensions
compiler option. Thus,3c ms-extensions.c -- -fms-extensions
reproduces the problem ifms-extensions.c
contains:Some options for testing:
-fms-extensions
regression test containing a manually curated wider variety of constructs.-fms-extensions
(likely easier with Refactor testRUN
commands into a separate tool #355) and do that occasionally (we probably don't want to spend the time to run it on every change).-fms-extensions
and anything else that differs on Windows.I'm not sure which one offers the best trade-off between value and work.
The text was updated successfully, but these errors were encountered: