KhronosGroup / KhronosGroup/SPIRV-Tools

Add disassembly option to be forgiving for invalid binary.

Open
#2,657 0 comments 1 reaction 0 assignees View on GitHub
component:as/dis feature request
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

Currently the spirv-asm format allows invalid 32bit words to be recorded (https://github.com/KhronosGroup/SPIRV-Tools/blob/master/syntax.md#arbitrary-integers) the disassembler should provide an option to emit this format if the given words are unknown.

If the invalid words are the opcode/word count there isn't much we can do, but for other words in the binary we should be able to output the hex variant as a fallback.

Contributor guide

Open the contributing guide

Research direction

Start with syntax.md and its section on arbitrary integers to understand the permitted hex fallback format. Then locate the disassembler path that handles unknown words and verify the behavior for invalid operands versus invalid opcodes or word counts; done means supported invalid words emit hex while unrecoverable instruction structure remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.