MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 430 forks source link

ls -al /dev/ causes a 'C-call boundary' exception on first call #2835

Closed notpeelz closed 6 years ago

notpeelz commented 6 years ago

Calling ls -al /dev triggers a C-call boundary exception, and crashes subsequent ls executions.

Tested on OC 1.7.2.1166, MC 1.7.10, OpenOS 1.7.2

Steps to reproduce

1) Boot machine 2) ls -al /dev 3) ls /dev

image

Workaround

If ls /dev is executed first, it prevents ls -al /dev from crashing.

image

payonel commented 6 years ago

this was fixed with a small refactor to ls, putting all the filesystem calls before functional calls to lua std lib like pairs fixed in 1a6756248c010fdceff6f50ea4f3023c9362931a