-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Assertion triggered while compiling vibe-d with master #3501
Comments
Thx, very helpful to know now about it, without having to wait for feedback for the upcoming beta. #3486 added a check in this regard, while the previous code would unconditionally set the initializer for the global var, without checking whether it was already defined. |
Surfacing now as ldc-developers#3486 added a corresponding assertion. I've tested this with an older vibe-d v0.8.6 lying around on my box. The assertion was hit for the TypeInfo of a nested struct: https://github.com/vibe-d/vibe.d/blob/3c7ae13989003b7ebc59de23c5b6a0fb0466f119/http/vibe/http/router.d#L570-L574 I wasn't able to quickly reduce it to a stand-alone testcase and am reluctant to put any more effort into this.
Surfacing now as ldc-developers#3486 added a corresponding assertion. I've tested this with an older vibe-d v0.8.6 lying around on my box. The assertion was hit for the TypeInfo of a nested struct: https://github.com/vibe-d/vibe.d/blob/3c7ae13989003b7ebc59de23c5b6a0fb0466f119/http/vibe/http/router.d#L570-L574 I wasn't able to quickly reduce it to a stand-alone testcase and am reluctant to put any more effort into this.
Surfacing now as #3486 added a corresponding assertion. I've tested this with an older vibe-d v0.8.6 lying around on my box. The assertion was hit for the TypeInfo of a nested struct: https://github.com/vibe-d/vibe.d/blob/3c7ae13989003b7ebc59de23c5b6a0fb0466f119/http/vibe/http/router.d#L570-L574 I wasn't able to quickly reduce it to a stand-alone testcase and am reluctant to put any more effort into this.
@kinke : I'm still seeing this on Windows with 4240644. Here is the error in the build log. |
You're seeing the same assertion, but the cause is entirely unrelated, Windows-specific and not a regression. Thx for letting us know & using the assertions-enabled master build. |
…Info_Class name As reported in ldc-developers#3501 (comment). Previously, LDC would simply override an existing TypeDescriptor global with an equivalent definition if assertions were disabled. Use different equivalent TypeDescriptors in this exotic case now, by using proper mangling. [The linker can presumably still fold duplicates via ICF.] Ideally, these descriptors would be truly unique, but WinEH depends on string comparisons to check for matching catch clauses, and currently depends on TypeInfo_Class.name to generate these strings at runtime when throwing an exception, see https://github.com/ldc-developers/druntime/blob/19731a92a97dbe4d7f7a4e15ceaff8444a1f879a/src/ldc/eh_msvc.d#L192-L211. So if those names were fully qualified (`cd->toPrettyChars(*true*)` during ClassInfo generation), we'd be fine, but that'd obviously be a breaking change and diverge from upstream.
…Info_Class name As reported in ldc-developers#3501 (comment). Previously, LDC would simply override an existing TypeDescriptor global with an equivalent definition if assertions were disabled. Use different equivalent TypeDescriptors in this exotic case now, by using proper mangling. [The linker can presumably still fold duplicates via ICF.] Ideally, these descriptors would be truly unique, but WinEH depends on string comparisons to check for matching catch clauses, and currently depends on TypeInfo_Class.name to generate these strings at runtime when throwing an exception, see https://github.com/ldc-developers/druntime/blob/19731a92a97dbe4d7f7a4e15ceaff8444a1f879a/src/ldc/eh_msvc.d#L192-L211. So if those names were fully qualified (`cd->toPrettyChars(*true*)` during ClassInfo generation), we'd be fine, but that'd obviously be a breaking change and diverge from upstream.
Mac OSX 10.15, but I think you'll be able to reproduce on all platforms (our CI caught it).
The text was updated successfully, but these errors were encountered: