Skip to content

Commit cb69db8

Browse files
bump cryptify version, update flow statement
1 parent 96e8f25 commit cb69db8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

auto_obfuscate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ proc-macro2 = "1.0"
1414
rand = "0.8.0"
1515
regex = "1.5.4"
1616
clap = "3.0"
17-
cryptify = "3.1.0"
17+
cryptify = "3.2.1"

auto_obfuscate/src/flow.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,12 @@ impl FlowObfuscator {
8383
//randomize the order of variable assignments
8484
statements.shuffle(&mut rng);
8585

86-
// Empty inline asm acts as full optimization barrier - LLVM cannot reason past it
8786
let loop_block = quote! {
8887
loop {
89-
unsafe { std::arch::asm!("", options(nostack)); }
90-
if _dummy_counter > _dummy_upper_bound {
88+
if std::hint::black_box(_dummy_counter) > std::hint::black_box(_dummy_upper_bound) {
9189
break;
9290
}
93-
_dummy_counter = _dummy_counter + _dummy_increment;
91+
_dummy_counter = std::hint::black_box(std::hint::black_box(_dummy_counter) + std::hint::black_box(_dummy_increment));
9492
}
9593
};
9694

0 commit comments

Comments
 (0)