Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Jun 18, 2024

Rather than treating them as custom sections. Also fix UB where invalid
Section enum values could be used as keys in a map. Use the raw uint8_t
section IDs as keys instead. Re-enable a disabled spec test that was failing
because of this bug and UB.

Rather than treating them as custom sections. Also fix UB where invalid
`Section` enum values could be used as keys in a map. Use the raw `uint8_t`
section IDs as keys instead. Re-enable a disabled spec test that was failing
because of this bug and UB.
@tlively tlively requested a review from kripken June 18, 2024 00:05
sectionCode != BinaryConsts::Section::Code) {
if (!seenSections.insert(BinaryConsts::Section(sectionCode)).second) {
if (sectionCode != BinaryConsts::Section::Custom) {
if (!seenSections.insert(sectionCode).second) {
Copy link
Member

Choose a reason for hiding this comment

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

Ifs can be combined into a single if?

@tlively tlively enabled auto-merge (squash) June 18, 2024 17:54
@tlively tlively merged commit c3b9cde into main Jun 18, 2024
@tlively tlively deleted the malformed-custom-section-id branch June 18, 2024 18:13
@gkdn gkdn mentioned this pull request Aug 31, 2024
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