Skip to content

Prevent inlining of HostCell.isEqual#99

Merged
krbarnes merged 1 commit intomasterfrom
no-inlining-please-sir
Jun 13, 2018
Merged

Prevent inlining of HostCell.isEqual#99
krbarnes merged 1 commit intomasterfrom
no-inlining-please-sir

Conversation

@krbarnes
Copy link
Copy Markdown
Contributor

HostCell isEqual has been causing crashes since Swift 4.1. We don't have a reproducible test case for this, but we have similar crashes caused by the optimizer. As a work around we can tell the isEqual function to never inline and cross our fingers that this crash stops happening.

Example of top of stack from a crash report:

0  Shopify                 __hidden#21025_ (__hidden#20994_:107:14)
1  Shopify                 isEqual (HostCell.swift:97:24)
2  Shopify                 isRow (TableSectionChangeSet.swift:164:16)
3  Shopify                 isRow (TableSectionChangeSet.swift)
4  Shopify                 calculateChanges (TableSectionChangeSet.swift:137:7)
5  Shopify                 init (TableSectionChangeSet.swift:76:3)
6  Shopify                 calculateTableChanges (FunctionalTableData.swift:465:10)
7  Shopify                 doRenderAndDiff (FunctionalTableData.swift)

Copy link
Copy Markdown
Contributor

@g-Off g-Off left a comment

Choose a reason for hiding this comment

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

🤞

@krbarnes krbarnes merged commit 35f1be5 into master Jun 13, 2018
@krbarnes krbarnes deleted the no-inlining-please-sir branch June 13, 2018 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants