You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The embedder-example.c returns a null pointer when it executes the wasm_module_new_text function.
My configuation is as follows
starship:~/work/tagion_main/WAVM/Examples/embedder/c> uname -a
Linux starship 4.15.0-1073-oem #83-Ubuntu SMP Mon Feb 17 11:21:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
starship:~/work/tagion_main/WAVM/Examples/embedder/c> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
starship:/work/tagion_main/WAVM/Examples/embedder/c> g++ --version
g++ (Ubuntu 7.5.0-3ubuntu118.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
starship:/work/tagion_main/WAVM/Examples/embedder/c> dpkg -l|grep llvm
ii libllvm6.0:amd64 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm9:amd64 1:9-2ubuntu18.04.2 amd64 Modular compiler and toolchain technologies, runtime library
ii llvm 1:6.0-41exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM)
ii llvm-6.0 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies
ii llvm-6.0-dev 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-6.0-runtime 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-runtime 1:6.0-41exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM), bytecode interpreter
The example is placed in.
cd Examples/embedder/c
And hardcoded Makefile is also place in this directory.
Run the example by
starship:~/work/tagion_main/WAVM/Examples/embedder/c> make
export LD_LIBARY_PATH=/home/carsten/work/tagion_main/WAVM; ./embedder-example
engine 0x55fe5b9d5f20
compartment 0x55fe5b9d6370
store 0x55fe5b9d7480
Start
sizeof(hello_wast) =147
module (nil)
Makefile:20: recipe for target 'run' failed
make: *** [run] Error 1
Thank you
cbleser
The text was updated successfully, but these errors were encountered:
I have fix the issue in this branch.
I seems that the source string for the wasm_module_new_text should be a cstring (\0 terminated string) and not a char[].
I work when the type of
hello_wast
is change from char[] to char*
… null terminated.
Previously, it added a null terminator to all input strings, which resulted in a lexer error if the input string was already null terminated.
FixesWAVM#264
The embedder-example.c returns a null pointer when it executes the wasm_module_new_text function.
My configuation is as follows
starship:~/work/tagion_main/WAVM/Examples/embedder/c> uname -a
Linux starship 4.15.0-1073-oem #83-Ubuntu SMP Mon Feb 17 11:21:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
starship:~/work/tagion_main/WAVM/Examples/embedder/c> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
starship:
/work/tagion_main/WAVM/Examples/embedder/c> g++ --version18.04) 7.5.0g++ (Ubuntu 7.5.0-3ubuntu1
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
starship:
/work/tagion_main/WAVM/Examples/embedder/c> dpkg -l|grep llvmubuntu18.04.2 amd64 Modular compiler and toolchain technologies, runtime libraryii libllvm6.0:amd64 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm9:amd64 1:9-2
ii llvm 1:6.0-41
exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM)ii llvm-6.0 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies
ii llvm-6.0-dev 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-6.0-runtime 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-runtime 1:6.0-41
exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM), bytecode interpreterI have forked the project into https://github.com/tagion/WAVM.git.
git clone https://github.com/tagion/WAVM.git
git fetch
git checkout examble_null_result
The example is placed in.
cd Examples/embedder/c
And hardcoded Makefile is also place in this directory.
Run the example by
starship:~/work/tagion_main/WAVM/Examples/embedder/c> make
export LD_LIBARY_PATH=/home/carsten/work/tagion_main/WAVM; ./embedder-example
engine 0x55fe5b9d5f20
compartment 0x55fe5b9d6370
store 0x55fe5b9d7480
Start
sizeof(hello_wast) =147
module (nil)
Makefile:20: recipe for target 'run' failed
make: *** [run] Error 1
Thank you
cbleser
The text was updated successfully, but these errors were encountered: