[llvm-bugs] [Bug 44769] New: Viz.js: wasm-opt: Fatal: error in validating input
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 4 06:02:31 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44769
Bug ID: 44769
Summary: Viz.js: wasm-opt: Fatal: error in validating input
Product: libraries
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: WebAssembly
Assignee: unassignedbugs at nondot.org
Reporter: gabriel-llvm-bugs at mastergk.de
CC: llvm-bugs at lists.llvm.org
Created attachment 23085
--> https://bugs.llvm.org/attachment.cgi?id=23085&action=edit
File generated by EMCC_DEBUG=1
Already reported to emscripten and they asked me to file it here:
https://github.com/emscripten-core/emscripten/issues/10331
The problem is that in GraphViz the lib/neatogen/overlap.[hc] are mismatching:
void remove_overlap(int dim, SparseMatrix A, int m, real *x, real *label_sizes,
int ntry, real initial_scaling, int do_shrinking, int *flag) {}
vs.
void remove_overlap(int dim, SparseMatrix A, real *x, real *label_sizes, int
ntry, real initial_scaling, int edge_labeling_scheme, int n_constr_nodes, int
*constr_nodes, SparseMatrix A_constr, int doShrink, int *flag);
After manually fixing this the WASM validates.
I try to compile this: https://github.com/mdaines/viz.js
Command executed:
make deps-full
make all
deps-full extracts a graphviz archive. You have to manually patch the configure
file and get rid of "-ffast-math". (see See Bug 44227)
Attached WASM file that fails to validate.
> emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.39.6 (commit
ff44c97ffa3ace24792e3c9d785677050cfec6b2)
> clang-10 --version
clang version 10.0.0
(/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project
06cfcdcca7de9c88a1e885eff0d0c4c07090ad48)
Build line:
/usr/bin/wasm-opt --post-emscripten --inline-main --no-exit-runtime -O2
--pass-arg=emscripten-sbrk-ptr at 220832 module.wasm -o module.wasm --mvp-features
--strip-dwarf
Output of wasm2wat:
module.wasm:00627b2: error: type mismatch in call, expected [i32, i32, i32,
i32, i32, i32, f64, i32, i32] but got [i32, i32, f64, i32, i32, i32, i32, i32,
i32]
module.wasm:00627b5: error: type mismatch in block, expected [] but got [i32]
module.wasm:0062d8c: error: type mismatch in call, expected [i32, i32, i32,
i32, i32, i32, f64, i32, i32] but got [i32, i32, f64, i32, i32, i32, i32, i32,
i32]
module.wasm:0062da5: error: type mismatch in block, expected [] but got [i32]
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200204/c0e472e4/attachment.html>
More information about the llvm-bugs
mailing list