mirror of
https://github.com/burrowers/garble.git
synced 2026-04-22 23:57:14 +08:00
add trash block generator (#825)
add trash block generator For making static code analysis even more difficult, added feature for generating trash blocks that will never be executed. In combination with control flow flattening makes it hard to separate trash code from the real one, plus it causes a large number of trash references to different methods. Trash blocks contain 2 types of statements: 1. Function/method call with writing the results into local variables and passing them to other calls 2. Shuffling or assigning random values to local variables
This commit is contained in:
Vendored
+1
-1
@@ -78,7 +78,7 @@ func multiHardeningTest(i int) int {
|
||||
return multiply(i);
|
||||
}
|
||||
|
||||
//garble:controlflow flatten_passes=1 junk_jumps=10 block_splits=10
|
||||
//garble:controlflow flatten_passes=1 junk_jumps=10 block_splits=10 trash_blocks=32
|
||||
func main() {
|
||||
// Reference to the unexported interface triggers creation of a new interface
|
||||
// with a list of all functions of the private interface
|
||||
|
||||
Reference in New Issue
Block a user