VM: we can save the process by throwing a normal error here
parent
abbf8f8f1f
commit
134a9fbcb4
|
@ -1,5 +1,5 @@
|
||||||
USING: alien.c-types alien.data io io.encodings.ascii io.files
|
USING: alien alien.c-types alien.data debugger io io.encodings.ascii
|
||||||
io.pathnames io.streams.c kernel math specialized-arrays
|
io.files io.pathnames io.streams.c kernel math specialized-arrays
|
||||||
strings tools.test ;
|
strings tools.test ;
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
|
|
||||||
|
@ -33,3 +33,5 @@ SPECIALIZED-ARRAY: int
|
||||||
|
|
||||||
] with-test-directory
|
] with-test-directory
|
||||||
|
|
||||||
|
|
||||||
|
[ 3 10 99 <alien> fseek ] [ vm-error? ] must-fail-with
|
||||||
|
|
|
@ -132,7 +132,7 @@ void factor_vm::safe_fseek(FILE* stream, off_t offset, int whence) {
|
||||||
whence = SEEK_END;
|
whence = SEEK_END;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
critical_error("Bad value for whence", whence);
|
general_error(ERROR_IO, tag_fixnum(EINVAL), false_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
Loading…
Reference in New Issue