Skip to content

Assertion `t == type || type == ValueType::Any' failed at wasm-interp #2664

@Q1IQ

Description

@Q1IQ

Current State

Run the following command:

wasm-interp --enable-all --run-export=main test.wasm -a f64:833.432115754113 -a f64:115.57568723568522 -a f64:646.4519538036589

test.wasm.txt

Observed output:

wasm-interp: /work/harnesses/sources/wabt/include/wabt/interp/interp.h:591: void wabt::interp::Value::CheckType(wabt::interp::ValueType) const: Assertion `t == type || type == ValueType::Any' failed.

GDB Backtrace

warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
wasm-interp: /work/harnesses/sources/wabt/include/wabt/interp/interp.h:591: void wabt::interp::Value::CheckType(wabt::interp::ValueType) const: Assertion `t == type || type == ValueType::Any' failed.

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140029331380160) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140029331380160) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140029331380160) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140029331380160, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f5b1e928476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f5b1e90e7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f5b1e90e71b in __assert_fail_base (fmt=0x7f5b1eac3130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563acece4080 "t == type || type == ValueType::Any", file=0x563acece4020 "/work/harnesses/sources/wabt/include/wabt/interp/interp.h", line=591, function=<optimized out>) at ./assert/assert.c:94
#6  0x00007f5b1e91fe96 in __GI___assert_fail (assertion=0x563acece4080 "t == type || type == ValueType::Any", file=0x563acece4020 "/work/harnesses/sources/wabt/include/wabt/interp/interp.h", line=591, function=0x563acece3fa0 "void wabt::interp::Value::CheckType(wabt::interp::ValueType) const") at ./assert/assert.c:103
#7  0x0000563aceb8a94d in wabt::interp::Value::CheckType (t=..., this=0x7ffca3f9c000) at /work/harnesses/sources/wabt/include/wabt/interp/interp.h:591
#8  wabt::interp::Value::Get<double> (this=0x7ffca3f9c000) at /work/harnesses/sources/wabt/include/wabt/interp/interp-inl.h:457
#9  wabt::interp::Thread::Pop<double> (this=this@entry=0x7ffca3fa05b0) at /work/harnesses/sources/wabt/src/interp/interp.cc:1221
#10 0x0000563aceb8aa1e in wabt::interp::Thread::DoBinop<double, double> (this=this@entry=0x7ffca3fa05b0, f=f@entry=0x563aceb82754 <wabt::interp::Mul<double>(double, double)>) at /work/harnesses/sources/wabt/src/interp/interp.cc:2194
#11 0x0000563aceb6a821 in wabt::interp::Thread::StepInternal (this=this@entry=0x7ffca3fa05b0, out_trap=out_trap@entry=0x7ffca3fa09b0) at /work/harnesses/sources/wabt/src/interp/interp.cc:1552
#12 0x0000563aceb7ea13 in wabt::interp::Thread::Run (this=this@entry=0x7ffca3fa05b0, num_instructions=998, num_instructions@entry=1000, out_trap=out_trap@entry=0x7ffca3fa09b0) at /work/harnesses/sources/wabt/src/interp/interp.cc:1201
#13 0x0000563aceb7eb69 in wabt::interp::Thread::Run (this=this@entry=0x7ffca3fa05b0, out_trap=out_trap@entry=0x7ffca3fa09b0) at /work/harnesses/sources/wabt/src/interp/interp.cc:1193
#14 0x0000563aceb7ee85 in wabt::interp::DefinedFunc::DoCall (this=0x512000000340, thread=..., params=..., results=..., out_trap=<optimized out>) at /work/harnesses/sources/wabt/src/interp/interp.cc:519
#15 0x0000563aceb4cf5e in wabt::interp::Func::Call (this=0x512000000340, store=..., params=std::vector of length 3, capacity 4 = {...}, results=std::vector of length 0, capacity 0, out_trap=out_trap@entry=0x7ffca3fa09b0, trace_stream=<optimized out>) at /work/harnesses/sources/wabt/src/interp/interp.cc:485
#16 0x0000563acea8e36d in RunSpecificExports (instance=..., errors=errors@entry=0x7ffca3fa10f0, calls=std::vector of length 1, capacity 1 = {...}) at /work/harnesses/sources/wabt/src/tools/wasm-interp.cc:242
#17 0x0000563acea98b21 in ReadAndRunModule (module_filename=<optimized out>) at /work/harnesses/sources/wabt/src/tools/wasm-interp.cc:430
#18 ProgramMain (argc=<optimized out>, argv=<optimized out>) at /work/harnesses/sources/wabt/src/tools/wasm-interp.cc:450
#19 0x0000563acea991c4 in main (argc=<optimized out>, argv=<optimized out>) at /work/harnesses/sources/wabt/src/tools/wasm-interp.cc:456
A debugging session is active.

	Inferior 1 [process 1509178] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

WABT Version or Commit you used

Commit: ee87962
Version: 1.0.39 (git~1.0.39-3-gee879620)

Operating system information

Ubuntu 20.04

Hardware Architecture

amd64 (x86_64)

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