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
Run ./pocket -c "import io" and observe the segfault
Proposed fix:
diff --git a/src/core/vm.c b/src/core/vm.c
index 8b8eeaa..243dcc5 100644
--- a/src/core/vm.c+++ b/src/core/vm.c@@ -466,6 +466,7 @@ Var vmImportModule(PKVM* vm, String* from, String* path) {
uint32_t search_path_idx = 0;
do {
+ if (!vm->config.resolve_path_fn) break; // when compiled without libs
// If we reached here. It's not a native module (ie. module's absolute path
// is required to import and cache).
_resolved = vm->config.resolve_path_fn(vm, from_path, path->data);
The text was updated successfully, but these errors were encountered:
How to reproduce:
Makefile
.-DPK_NO_LIBS
to the CFLAGS./src/libs/
fromSRC_DIRS
make clean
and rebuild./pocket -c "import io"
and observe the segfaultProposed fix:
The text was updated successfully, but these errors were encountered: