russellallen / self

Making the world safe for objects
http://selflanguage.org
707 stars 76 forks source link

Restartable syscalls on BSDs #150

Open nbuwe opened 1 year ago

nbuwe commented 1 year ago

When I ported Self VM to NetBSD and FreeBSD one kludge I had to not use SA_RESTART like linux does. I didn't have time to figure out what was wrong, I might have messed up elsewhere in the Self code (cf. setAsyncIfFail and friends).

https://github.com/russellallen/self/blob/fcbb0d40a0b6d3accb88559b3efccc162d14e74d/vm/src/unix/os/sig_unix.hh#L47-L52

This also most likely has implications for InterruptedContext::in_system_trap b/c the pc will not be pointing to the trap instruction, but past it.

This is a reminder that this issue needs further investigation.

russellallen commented 2 months ago

Note for myself: I've confirmed this happens. I thought it was causing socket issues, but that was https://github.com/russellallen/self/commit/e67fe3f8540c6026bb4e22bd84ce6b29815a38a8