Skip to content
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

fix #39804, ABI handling of structs with String references #39821

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

JeffBezanson
Copy link
Sponsor Member

It looks to me like the other ABIs don't need this, but somebody else should check to be sure.

Unfortunately does not help #28669.

fix #39804

@JeffBezanson JeffBezanson added compiler:codegen Generation of LLVM IR and native code bugfix This change fixes an existing bug backport 1.6 Change should be backported to release-1.6 labels Feb 25, 2021
@@ -151,7 +151,7 @@ void classifyType(Classification& accum, jl_datatype_t *dt, uint64_t offset) con
size_t i;
for (i = 0; i < jl_datatype_nfields(dt); ++i) {
jl_value_t *ty = jl_field_type(dt, i);
if (!jl_is_datatype(ty) || ((jl_datatype_t*)ty)->layout == NULL || jl_is_array_type(ty))
if (jl_field_isptr(dt, i))
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think ->layout is necessarily defined. I'm unsure the best way to match _julia_struct_to_llvm here, as it seems many other abi files might similarly be trying to access it.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated a couple other cases; see what you think.

@JeffBezanson JeffBezanson merged commit 9ca31f7 into master Feb 26, 2021
@JeffBezanson JeffBezanson deleted the jb/fix39804 branch February 26, 2021 21:48
KristofferC pushed a commit that referenced this pull request Mar 2, 2021
@KristofferC KristofferC mentioned this pull request Mar 2, 2021
52 tasks
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Mar 14, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault in Catlab tests on v1.6.0-rc1 but pass on 1.7.0-DEV.599
3 participants