Hi guys, i'm new at this, but why is it when compile and run this as AOT. I get a Sig 7 erorr
#include <vector>
struct T {
std::vector<int> updates;
};
T t;
__attribute__((export_name("Init"))) int Init() {
int size = t.updates.size();
t.updates.push_back(1);
size = t.updates.size();
return 0;
}
This works fine
#include <vector>
struct T {
std::vector<int> updates;
};
__attribute__((export_name("Init"))) int Init() {
T t;
int size = t.updates.size();
t.updates.push_back(1);
size = t.updates.size();
return 0;
}
i ran into a similar issue in .wasm where all I had to do was add -mexec-model=reactor
wondering if there is a similar
configuration i can do for AOT?
This topic was moved here from #general > wamrc static intializer by fitzgen (he/him).
Last updated: Nov 22 2024 at 16:03 UTC