Skip to content

avm2: Include attribute and element name in XML parser error 1104 - #24352

Open
evilpie wants to merge 2 commits into
ruffle-rs:masterfrom
evilpie:xml-duplicate-attr-error
Open

avm2: Include attribute and element name in XML parser error 1104#24352
evilpie wants to merge 2 commits into
ruffle-rs:masterfrom
evilpie:xml-duplicate-attr-error

Conversation

@evilpie

@evilpie evilpie commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Description

The XML parser error #1104 for duplicate attributes should include the name of the attribute and element name.

Testing

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@evilpie
evilpie force-pushed the xml-duplicate-attr-error branch 2 times, most recently from 5bafc6e to ee4666b Compare August 8, 2026 11:23
@evilpie
evilpie marked this pull request as ready for review August 8, 2026 11:23
@evilpie evilpie added A-avm2 Area: AVM2 (ActionScript 3) xml T-fix Type: Bug fix (in something that's supposed to work already) labels Aug 8, 2026
@evilpie
evilpie requested a review from Lord-McSweeney August 13, 2026 05:44
@evilpie evilpie added the waiting-on-review Waiting on review from a Ruffle team member label Aug 16, 2026
Comment thread core/src/avm2/e4x.rs
return Err(make_error_1088(activation));
}
Err(XmlError::InvalidAttr(XmlAttrError::Duplicated(_, _))) => {
return Err(make_xml_error(activation, XmlErrorCode::DuplicateAttribute));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this case now unreachable? Why was it removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This must have always been unreachable.

@Lord-McSweeney Lord-McSweeney Aug 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explicitly mark it unreachable!() and explain why then, so someone doesn't try to handle it in the future?

@evilpie
evilpie force-pushed the xml-duplicate-attr-error branch from ee4666b to 343e4d6 Compare August 20, 2026 07:05
@evilpie
evilpie enabled auto-merge (rebase) August 20, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) T-fix Type: Bug fix (in something that's supposed to work already) waiting-on-review Waiting on review from a Ruffle team member xml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants