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
[SR-2511] Compiler crash with incorrect checksum for freed object #45116
Comments
Separated the problematic code, add the following to bridging header and do typedef struct Foo {
int x;
enum {
A = 0, B, C
} y;
int z;
} Foo; This is solidly reproducible when nested enum is surrounded with primitive properties, I've tried typedef struct Bar {
} Bar;
typedef struct Foo {
struct Bar *x;
enum {
A = 0, B, C
} y;
struct Bar *z;
} Foo; When the enum is the last element in the structure the compiler also doesn't crash: typedef struct Foo {
int x;
enum {
A = 0, B, C
} y;
} Foo; Fun times! |
Interesting. Thanks for the reduction! |
Comment by Ronak Patel (JIRA) I just ran into this issue with Xcode 9.1; and ffmpeg 3.4. Any word on when this would be fixed? |
@swift-ci create |
Arnold tracked this one down to us importing the anonymous enum as having an underlying type of Int rather than Int32. We could fix just the storage part, but then you wouldn't be able to write If you're willing to hack the headers as a workaround, you can either give the enum a name or an explicit underlying type, |
Fixed in master (but unfortunately not the 4.1 branch, since we're trying to be less disruptive there). |
Comment by Ronak Patel (JIRA) Which version of Xcode would have this fix? |
Whichever one gets Swift 5. (Apple policy won't let me say more than that.) |
Update: "whichever one gets Swift 4.2, which hadn't been invented at the time" |
Additional Detail from JIRA
md5: 1edcf9b21eab4d78989b8b27999411b4
is duplicated by:
Issue Description:
Trying to compile a piece of code that depends on FFmpeg libavfilter in Xcode 7.3.1 and fails with the following lines present:
The text was updated successfully, but these errors were encountered: