Skip to content

Commit

Permalink
Revers Analyzer to old state to move any Analyzer changes to a sepera…
Browse files Browse the repository at this point in the history
…te PR
  • Loading branch information
TobiasWienand committed Aug 22, 2024
1 parent 1807044 commit 481be3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions Sources/Fuzzilli/Compiler/Compiler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ public class JavaScriptCompiler {
case .breakStatement:
// If we're in both .loop and .switch context, then the loop must be the most recent context
// (switch blocks don't propagate an outer .loop context) so we just need to check for .loop here
// TODO remove this comment once the Analyzer bug fixs has been merged. Until then the code in this switch case is buggy.
if contextAnalyzer.context.contains(.loop){
emit(LoopBreak())
} else if contextAnalyzer.context.contains(.switchBlock){
Expand Down
5 changes: 0 additions & 5 deletions Sources/Fuzzilli/FuzzIL/Analyzer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ struct ContextAnalyzer: Analyzer {

newContext.formUnion(contextStack.secondToTop)
}
if (instr.op.contextOpened.contains(.switchBlock)) {
newContext.remove(.loop)
} else if (instr.op.contextOpened.contains(.loop)) {
newContext.remove(.switchBlock)
}
contextStack.push(newContext)
}
}
Expand Down

0 comments on commit 481be3c

Please sign in to comment.