Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Name section parsing #268

@mikevoronov

Description

@mikevoronov

Hi!

As i understand correctly, It seems that parsing of name section is incomplete. According to the spec it follow that: name section lies in custom section and it can has some (not one) subsections of three possible types (ModuleNameSection, FunctionNameSection, LocalNameSection). So pseudo-code for its deserialization could be as such:

1. read custom header with name and size payload_len
2. while current_readed < payload_len:
  3. read name subsection with size name_payload_len
  4. current_readed += name_payload_len

But now deserialization includes only 1 and 3 steps and parses only the first section. And names_section returns not a sequence of subsections but just an enum that could be one of these subsection types. So if a module has all these three subsection types, it is possible to get only the first one (and also serialize only one).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions