Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Multi-V-VM/MVVM
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryang00 committed Jan 22, 2024
2 parents 73d33ab + 6b276a4 commit d048687
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
14 changes: 5 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
FROM ubuntu:lunar

RUN apt-get update && apt-get install -y \
libssl-dev gcc-13 g++-13 libprotobuf-c-dev libprotobuf-dev libgrpc-dev libfmt-dev llvm-14-dev libedit-dev libcxxopts-dev libpfm4-dev liblldb-dev libbenchmark-dev ninja-build libpcap-dev \
libssl-dev gcc-13 g++-13 libprotobuf-c-dev libprotobuf-dev libgrpc-dev libfmt-dev llvm-14-dev libedit-dev libcxxopts-dev libpfm4-dev liblldb-dev libbenchmark-dev ninja-build libpcap-dev libopenblas-pthread-dev \
wget git cmake ninja-build python3 python3-pip \
lsb-release software-properties-common gnupg

RUN cd /opt \
&& wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz \
&& wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz \
&& tar -xzf wasi-sdk-*.tar.gz \
&& mv wasi-sdk-20.0 wasi-sdk \
&& rm wasi-sdk-20.0-linux.tar.gz

RUN mv /opt/wasi-sdk/bin/wasm-ld /opt/wasi-sdk/bin/wasm-ld.bak \
&& echo '#!/bin/bash \n/opt/wasi-sdk/bin/wasm-ld.bak --no-check-features "$@"' | tee /opt/wasi-sdk/bin/wasm-ld \
&& chmod +x /opt/wasi-sdk/bin/wasm-ld
&& mv wasi-sdk-21.0 wasi-sdk \
&& rm wasi-sdk-21.0-linux.tar.gz

RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository -y "deb http://apt.llvm.org/lunar/ llvm-toolchain-lunar-17 main" \
&& apt-get update \
&& apt-get install -y clang-17 lldb-17 lld-17 clangd-17 \
tmux vim gdb wabt
tmux vim gdb wabt neovim

USER ubuntu
2 changes: 1 addition & 1 deletion src/wamr_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void sigtrap_handler(int sig) {
signal(SIGILL, sigtrap_handler);
#endif
call_count++;
if (snapshot_threshold != 0)
if (snapshot_threshold != 0 || checkpoint)
if (call_count >= snapshot_threshold || checkpoint) {
fprintf(stderr, "serializing\n");
serialize_to_file(exec_env);
Expand Down
8 changes: 4 additions & 4 deletions src/wamr_module_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ void WAMRModuleInstance::dump_impl(WASMModuleInstance *env) {
memories.push_back(local_mem);
}
global_data = std::vector<uint8>(env->global_data, env->global_data + env->global_data_size);
LOGV(DEBUG) << env->global_data_size;
for (int i = 0; i < env->global_data_size; i++) {
LOGV(DEBUG) << env->global_data[i];
}
// LOGV(DEBUG) << env->global_data_size;
// for (int i = 0; i < env->global_data_size; i++) {
// LOGV(DEBUG) << env->global_data[i];
// }
dump(&wasi_ctx, &env->module->wasi_args);

if (wamr->is_aot) {
Expand Down
2 changes: 2 additions & 0 deletions test/counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include <unistd.h>
int a(int c){
static int b=0;
b++;
printf("%d %d\n",c,b);
// printf("\n");
}
int main(int argv,char ** argc){
Expand Down

0 comments on commit d048687

Please sign in to comment.