File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
src/tools/miri/src/shims/unix Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
57
57
let flags = this. read_scalar ( flags) ?. to_i32 ( ) ?;
58
58
59
59
let epoll_cloexec = this. eval_libc_i32 ( "EPOLL_CLOEXEC" ) ;
60
- if flags == epoll_cloexec {
61
- // Miri does not support exec, so this flag has no effect.
62
- } else if flags != 0 {
63
- throw_unsup_format ! ( "epoll_create1 flags {flags} are not implemented" ) ;
60
+
61
+ // Miri does not support exec, so EPOLL_CLOEXEC flag has no effect.
62
+ if flags != epoll_cloexec && flags != 0 {
63
+ throw_unsup_format ! (
64
+ "epoll_create1: flag {:#x} is unsupported, only 0 or EPOLL_CLOEXEC are allowed" ,
65
+ flags
66
+ ) ;
64
67
}
65
68
66
69
let fd = this. machine . fds . insert_fd ( FileDescriptor :: new ( Epoll :: default ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
179
179
// their values differ.
180
180
if domain != this. eval_libc_i32 ( "AF_UNIX" ) && domain != this. eval_libc_i32 ( "AF_LOCAL" ) {
181
181
throw_unsup_format ! (
182
- "socketpair: Unsupported domain {:#x} is used , only AF_UNIX \
182
+ "socketpair: domain {:#x} is unsupported , only AF_UNIX \
183
183
and AF_LOCAL are allowed",
184
184
domain
185
185
) ;
186
186
} else if type_ != 0 {
187
187
throw_unsup_format ! (
188
- "socketpair: Unsupported type {:#x} is used , only SOCK_STREAM, \
188
+ "socketpair: type {:#x} is unsupported , only SOCK_STREAM, \
189
189
SOCK_CLOEXEC and SOCK_NONBLOCK are allowed",
190
190
type_
191
191
) ;
192
192
} else if protocol != 0 {
193
193
throw_unsup_format ! (
194
- "socketpair: Unsupported socket protocol {protocol} is used , \
194
+ "socketpair: socket protocol {protocol} is unsupported , \
195
195
only 0 is allowed",
196
196
) ;
197
197
}
You can’t perform that action at this time.
0 commit comments