Bug 2219392 - Bad magic format `version %#x (MVP)' (bad format char: #) for wasm files
Summary: Bad magic format `version %#x (MVP)' (bad format char: #) for wasm files
Keywords:
Status: ON_QA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: file
Version: 9.2
Hardware: Unspecified
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Vincent Mihalkovič
QA Contact: Karel Volný
URL:
Whiteboard:
Depends On:
Blocks: 2221659
TreeView+ depends on / blocked
 
Reported: 2023-07-03 12:43 UTC by Paul Dwyer
Modified: 2023-08-10 13:00 UTC (History)
5 users (show)

Fixed In Version: file-5.39-13.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2221659 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161444 0 None None None 2023-07-03 12:45:20 UTC

Description Paul Dwyer 2023-07-03 12:43:42 UTC
Description of problem:
file cannot identify wasm (Web Assembly files)

Version-Release number of selected component (if applicable):
file-5.39-12.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. download a sample wasm file e.g.
curl --max-time 60 -s -H "Accept:application/vnd.github.v3.raw" "https://api.github.com/repos/mozilla/source-map/contents/lib/mappings.wasm" -O
2. file ./mappings.wasm

Actual results:
./mappings.wasm: ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)

Expected results:
Not to error

RHEL8 (file-5.33-8.el8.x86_64) produces the following but this does not look quite right either
$ file mappings.wasm 
mappings.wasm: , created: Fri Jul 10 18:08:00 2037, modified: Tue Apr 20 16:29:51 2021

Fedora 38 (file-5.44-3.fc38.x86_64) produces the following output
$ file mappings.wasm 
mappings.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)

Additional info:
Problem looks like the reported upstream issue, fixed in 5.40, however I cannot see the fix to test.

https://bugs.astron.com/view.php?id=170


Note You need to log in before you can comment on or make changes to this bug.