error.c

rb_sys_fail()

In MRI, if errno isn't set when rb_sys_fail() is called within an extension it will segfault. Since error handling is not typically handled via errno on MS Windows but instead through GetLastError(), this means MRI Ruby will segfault from time to time when rb_sys_fail() is called instead of providing a useful or correct error message.

In Sapphire rb_sys_fail() resorts to GetLastError() and creates a message using rb_w32_strerror().

Also available in: HTML TXT