Skip to content

[SR-15302] AttributedString mis-compilation on Linux x86_64 with rebranch #57624

@compnerd

Description

@compnerd
Previous ID SR-15302
Radar None
Original Reporter @compnerd
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @compnerd
Priority Medium

md5: c31f76109ebd2918e05a0e3882c68286

Issue Description:

There seems to be a mis-compilation on Linux x86_64 with CFAttributedString that the rebranch uncovered. @etcwilde and I managed to reduce it down to a single file, but have not reduced it further. Unfortunately, it involves LICM, LoadStoreHoisting, and inlining potentially. In order to unblock the rebranch, this file might need to be optimized at -O0 on linux.

The following are the known failing tests associated with this issue:

The following tests FAILED:
        1602 - TestFoundation.TestNSAttributedString-test_enumerateAttributes (Failed)
        1623 - TestFoundation.TestNSMutableAttributedString-test_reverse_attribute_enumeration_with_extend_attributed_replace (Failed)
        1624 - TestFoundation.TestNSMutableAttributedString-test_direct_attributes_enumeration_with_extend_attributed_replace (Failed)
        1625 - TestFoundation.TestNSMutableAttributedString-test_reverse_attributes_enumeration_with_extend_attributed_replace (Failed)
        1628 - TestFoundation.TestNSMutableAttributedString-test_direct_attributes_enumeration_with_reduct_attributed_replace (Failed)
        1629 - TestFoundation.TestNSMutableAttributedString-test_reverse_attributes_enumeration_with_reduct_attributed_replace (Failed)
        1630 - TestFoundation.TestNSMutableAttributedString-test_direct_attribute_enumeration_with_extend_replace (Failed)
        1631 - TestFoundation.TestNSMutableAttributedString-test_reverse_attribute_enumeration_with_extend_replace (Failed)
        1632 - TestFoundation.TestNSMutableAttributedString-test_direct_attributes_enumeration_with_extend_replace (Failed)
        1633 - TestFoundation.TestNSMutableAttributedString-test_reverse_attributes_enumeration_with_extend_replace (Failed)
        1634 - TestFoundation.TestNSMutableAttributedString-test_direct_attribute_enumeration_with_reduct_replace (Failed)
        1635 - TestFoundation.TestNSMutableAttributedString-test_reverse_attribute_enumeration_with_reduct_replace (Failed)
        1636 - TestFoundation.TestNSMutableAttributedString-test_direct_attributes_enumeration_with_reduct_replace (Failed)
        1637 - TestFoundation.TestNSMutableAttributedString-test_reverse_attributes_enumeration_with_reduct_replace (Failed)
        1845 - TestFoundation.TestAttributedString-testConversionFromObjC (ILLEGAL)
        1848 - TestFoundation.TestAttributedString-testIncompleteConversionFromObjC (ILLEGAL)
        1850 - TestFoundation.TestAttributedString-testConversionNestedScope (ILLEGAL)
        1855 - TestFoundation.TestAttributedString-testConversionCoalescing (ILLEGAL)

Unfortunately, it is very difficult to debug. lldb consistently crashes when trying to execute any of these tests and gdb is unable to show a valid stack trace. Additionally, these only happen on optimized builds, so that throws more fun into the mix.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions