Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
R RevEngD
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CSSE374-Public
  • RevEngD
  • Merge requests
  • !7

The source project of this merge request has been removed.
Closed
Created Jan 25, 2018 by Ghost User@ghost
  • Report abuse
Report abuse

Exclusions and Entry Point Fixes in build()

  • Overview 0
  • Changes 1

There are two problems which I have ran into while working with the SceneBuilder class. The first is that there always is not an entry point, for example if just java.lang.String is being analyzed, no entry point would be needed. The syntax to create the SceneBuilder would be

Scene scene = SceneBuilder.create().addClass("java.lang.String").build();

Without the null check on this.loadMainClass(this.entryClassToLoad);,entryClassToLoad would be null and SootClass c = this.loadAppClass(name); would throw an exception.

The other problem which I encountered was that in the example drivers, packages were excluded such as in E1, addExclusions(Arrays.asList("java.*", "javax.*", "sun.*")) . These exclusions were not doing anything since these packages are already excluded by default.

When Scene is created it calls determineExcludedPackages(); which adds the following default exclusions

excludedPackages.add("java.*"); excludedPackages.add("sun.*"); excludedPackages.add("javax.*"); excludedPackages.add("com.sun.*"); excludedPackages.add("com.ibm.*"); excludedPackages.add("org.xml.*"); excludedPackages.add("org.w3c.*"); excludedPackages.add("apple.awt.*"); excludedPackages.add("com.apple.*");

In theory, calling options.set_exclude, like is done in the SceneBuilder, should override the default exclusions, but this does not appear to be the way it works. If a list of exclusions, or a blank list, was sent into options.set_exclude, the default exclusions were still in place. This was solved by calling options.set_include_all(true); which prevents determineExcludedPackages(); from excluding the above packages.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fixes