Auto merge of #2546 - RalfJung:comments, r=RalfJung

add/fix some comments
This commit is contained in:
bors 2022-09-18 12:07:56 +00:00
commit fd05ff5290
2 changed files with 5 additions and 2 deletions

View File

@ -295,7 +295,10 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
let main_ptr = ecx.create_fn_alloc_ptr(FnVal::Instance(entry_instance));
let sigpipe = 2; // Inlining of `DEFAULT` from https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config/sigpipe.rs
// Inlining of `DEFAULT` from
// https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config/sigpipe.rs.
// Alaways using DEFAULT is okay since we don't support signals in Miri anyway.
let sigpipe = 2;
ecx.call_function(
start_instance,

View File

@ -294,8 +294,8 @@ fn emulate_foreign_item_by_name(
let flags = this.read_scalar(flags)?.to_u32()?;
match flags {
0 => {
// BCRYPT_RNG_ALG_HANDLE
if algorithm != 0x81 {
// BCRYPT_RNG_ALG_HANDLE
throw_unsup_format!(
"BCryptGenRandom algorithm must be BCRYPT_RNG_ALG_HANDLE when the flag is 0"
);