Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 3feb6c7

Browse files
authored
Pass-Based FuzzyC2Cpg (#214)
* TypeNodePass * Port over more tests * Revert "Port over more tests" This reverts commit 1d986ed. * Adapt CpgTestFixture and tests (locals have ORDER now) * Remove superseded tests * Fix build. * Switch over to new AST/CFG creation and remove lots of old code * Remove lots of old code. * Cleanup * More dead code removal * scalafmt + correct CPG version * More cleanup * Fix pass order * Fix stub removal * Add JVM opts + a bit of cleanup * StubRemoval is now fast * scalafmt * Downgrade ANTLR version again - didn't mean to commit that * Set CPG version * Remove duplicate code * Fix goto handling * Add file and SOURCE_FILE edge for `<global>` node * Provide crash trigger for michael * Comment in and provide trigger * Revert "Comment in and provide trigger" This reverts commit e50cec8. * Revert "Provide crash trigger for michael" This reverts commit 3bdcc39. * Upgrade `cpg` - fixes bug when removing nodes * Fix race * Undo accidental renaming
1 parent 689c44d commit 3feb6c7

File tree

56 files changed

+268
-4890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+268
-4890
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ organization := "io.shiftleft"
33
scalaVersion := "2.13.1"
44
enablePlugins(GitVersioning)
55

6-
val cpgVersion = "0.11.334"
6+
val cpgVersion = "0.11.338"
77
val antlrVersion = "4.7.2"
88

99
libraryDependencies ++= Seq(

fuzzyc2cpg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
SCRIPT_ABS_PATH=$(readlink -f "$0")
44
SCRIPT_ABS_DIR=$(dirname $SCRIPT_ABS_PATH)
55

6-
$SCRIPT_ABS_DIR/target/universal/stage/bin/fuzzyc2cpg -Dlogback.configurationFile=$SCRIPT_ABS_DIR/config/logback.xml $@
6+
$SCRIPT_ABS_DIR/target/universal/stage/bin/fuzzyc2cpg -J-XX:+UseG1GC -J-XX:CompressedClassSpaceSize=128m -J-XX:+UseStringDeduplication -Dlogback.configurationFile=$SCRIPT_ABS_DIR/config/logback.xml $@

src/main/java/io/shiftleft/fuzzyc2cpg/ast/statements/jump/GotoStatement.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public String getTargetName() {
1212
return getChild(0).getEscapedCodeStr();
1313
}
1414

15+
public String getEscapedCodeStr() {
16+
return "goto " + getTargetName() + ";";
17+
}
18+
1519
public void accept(ASTNodeVisitor visitor) {
1620
visitor.visit(this);
1721
}

src/main/java/io/shiftleft/fuzzyc2cpg/output/inmemory/OutputModule.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/main/java/io/shiftleft/fuzzyc2cpg/output/inmemory/OutputModuleFactory.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/main/java/io/shiftleft/fuzzyc2cpg/output/protobuf/OutputModule.java

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/main/java/io/shiftleft/fuzzyc2cpg/output/protobuf/OutputModuleFactory.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)