Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#753 [Shrike] pop2 opcode not translated to Pop(2) instruction #775

Open
wants to merge 206 commits into
base: master
Choose a base branch
from

Conversation

RalfHerzog
Copy link
Contributor

Hopefully fixes #753 but I think some other tests fail. Maybe it's because of some setup issues on my machine. Need external review

@msridhar
Copy link
Member

It looks like there are some tests failing, e.g., the SlicerTests in wala.core. @RalfHerzog do you need help in debugging these test failures?

@ghost
Copy link

ghost commented Aug 20, 2020

DeepCode's analysis on #bb0fe4 found:

  • ℹ️ 2 minor issues. 👇

Top issues

Description Example fixes
Avoid throwing raw exception types. Occurrences: 🔧 Example fixes
Avoid reassigning parameters such as 'from'. Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

RalfHerzog and others added 19 commits August 20, 2020 18:23
  allow no default edge type
  remove uses of default to instead make e.g. hasEdge check for an edge with any label.  This is more consistent with what other APIs do.
	new file:   fact.java
	modified:   wala.testdata.txt

1) new test file

	new file:   ../../com.ibm.wala.core/src/main/java/com/ibm/wala/classLoader/ClassFileURLModule.java
	modified:   ../../com.ibm.wala.core/src/main/java/com/ibm/wala/core/util/config/AnalysisScopeReader.java

2) read class files as urls to load classes from arbitrary resources
This was the simplest way I could find to introduce [dependency locking](https://docs.gradle.org/current/userguide/dependency_locking.html), which should prevent issues like wala#898 / wala#899 in the future.  It adds a bunch of empty lock files for configurations without dependencies, but since they are auto-generated I don't think this is a big deal; it will be more fragile to try to only generate non-empty lock files.

For now, we use the `LENIENT` lock mode to work around failure of certain checks in the default mode; see the comments for details.  Even in `LENIENT` mode, dynamic dependencies should be fixed at the versions in the lock files.
The `KawaCallGraphTest` tests take too long to run.  This adds a limit to how many fixed point iterations the call graph construction runs for, which yields enough runs to pass the assertions while making the tests terminate faster.  This may cause an unexpected failure later if we tweak the internals of our fixed point computations, but that code is pretty stable.  And this approach is less flaky than just setting a timeout, since our core fixed point code is pretty deterministic AFAIK.  Plus, I don't know enough about what is being tested here to reduce the input enough to make a fast-running unit test.
liblit and others added 30 commits December 5, 2021 13:52
Turns out, IntelliJ IDEA doesn't like having a single directory be a
content root for more than one module.  OK, we can easily configure this
differently so that resources are copied from another task without
adding reusing that other task's resource directories to multiple
`SourceSet`s.
Previously, the top-level `build.gradle` iterated over all subprojects
and applied lots of additional build-configuration logic to subprojects
that contain Java source code.  Now, that Java-specific configuration
logic is extracted into its own `wala-java.gradle` script plugin, which
each individual subproject can load if appropriate.  This change makes
the top-level `build.gradle` a bit smaller and easier to read through.
Instead of task A explicitly declaring that it `dependsOn` task B, the
preferred style is for task A to declare that its inputs include task
B's outputs (or some subset thereof).  The dependency between the tasks
should be implicit, to be inferred by Gradle.
Javadoc tasks only arise in Java-containing subprojects, with one
important exception: the `aggregatedJavadocs` task in the top-level
project.  Extract Javadoc-specific configuration into its own script
plugin that we can reuse wherever we need it, even in projects that do
not contain any Java code of their own.

Corrects [a
regression](https://github.com/wala/WALA/runs/4424048891?check_suite_focus=true)
that was introduced by pull request wala#1075.

I'm also adding `aggregatedJavadocs` to the standard tasks performed by
all pre-merge GitHub CI jobs.  That should help us catch any future
regressions of this task earlier, before merging to `master`.
As used here, it's enough to have a `Provider` for the `Task` that may
eventually be created.  We don't need to force creation of that task
right away.
We didn't write this code and are in no position to critique its
formatting.
Our previous approach triggered deprecation warnings.  This new approach
works fine, and should be compatible with some future Gradle 8.x
release.  The important change seems to be to treat subprojects' Javadoc
tasks' class paths as Gradle "artifacts", which are allowed to be
produced and consumed in different (sub)projects.

Fixes wala#1079.
As [pointed out by
`$RANDOM_INTERNET_PERSON`](TwoStone/gradle-eclipse-compiler-plugin#13 (comment)),
this extra step is not needed.  Setting an executable in the fork
options (which we do) is sufficient.
Running `./gradlew runInspections` works fine on Fedora 35.  However,
on Ubuntu 20.04, it hangs.  The headless IntelliJ IDEA subprocess
fails to exit once the inspections have all been run.  I don't know
why.  Until we can make this work, we shouldn't run this as a weekly
GitHub action.
Pulls in various bug fixes and improvements; see https://github.com/mozilla/rhino/releases/tag/Rhino1_7_14_Release.  Includes a source location fix we contributed (mozilla/rhino#808)
This release has [a few
improvements](https://github.com/michel-kraemer/gradle-download-task/releases/tag/5.0.0)
over the 4.x versions of this plugin.  For example, it can download
concurrently with other build tasks or downloads, and it shows the
destination file name in the build progress message.
Organizing shared logic in this way avoids [
cross-project configuration](https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html#sec:convention_plugins_vs_cross_configuration)
that can "introduce configuration-time coupling between projects, which
can prevent optimizations like configuration-on-demand from working
properly."
For the best Gradle performance, we should always use Gradle
task-configuration-avoidance APIs to configure tasks only when
truly needed.
My recent attempt to avoid premature task configuration accidentally
broke the `aggregatedJavadocs` task.  This commit corrects that
regression.
`subprojects` can be invoked directly with a closure to apply to
each subproject.
# Conflicts:
#	com.ibm.wala.core/src/test/java/com/ibm/wala/core/tests/shrike/FloatingPointsTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Shrike] pop2 opcode not translated to Pop(2) instruction
7 participants