Skip to content
This repository has been archived by the owner on Jun 28, 2020. It is now read-only.

Calling require() ON vita-luajit crashes Vita #1

Open
Rinnegatamante opened this issue Nov 18, 2017 · 6 comments
Open

Calling require() ON vita-luajit crashes Vita #1

Rinnegatamante opened this issue Nov 18, 2017 · 6 comments
Assignees

Comments

@Rinnegatamante
Copy link

With LUA_LROOT set to app0:, trying to call a require crashes the app in symbol_lookup (dl.c)

Coredump:
https://pastebin.com/V615iLtj

@hyln9
Copy link
Owner

hyln9 commented Jan 20, 2018

@Rinnegatamante Sorry for the late reply. I'll fix this while documenting proper usage of FFI and JIT on vita-luajit. Hopefully I'll have time to do this one month later.

@hyln9 hyln9 self-assigned this Jan 20, 2018
@0x8080
Copy link

0x8080 commented Feb 23, 2018

ETA on a fix for this?

@svennd
Copy link

svennd commented Apr 7, 2018

@hyln9 sorry to bump this once more, if you don't have time is there another developer who might be able to fix this ? Thx for all your work !

@ramersonw
Copy link

@hyln9 "require" crashes even setting LUA_LROOT to another location, "ux0:data" for example.

@Rinnegatamante
Copy link
Author

@hyln9 Rinnegatamante/lpp-vita#41

@bb010g
Copy link

bb010g commented Jun 17, 2020

Tossed lpp-vita's eboot_unsafe.bin.elf into Ghidra and chased down where the coredump occurred. The crash is at

DLERR("Error: failed to acquire read lock\n");
, specifically
snprintf(_dl_errmsg, DLERRMSG_LENGTH_MAX+1, __VA_ARGS__); \
, inside an inlined snprintf() as far as I can tell, on the first instruction of the unrolled (4x str.w store word) copy loop.

(Just going to post this for now and comment again once I manage to figure out why it's crashing there; the draft's been here half a day and I started this overall yesterday.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants