-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nested functions are considered heap writes in the ModRef analysis #284
Comments
Here's the IR of
Step-by-step:
Function
So, that's not unheard of. Thus, it seems that nothing special is really going on for embedded functions; it even happens at the (global) script level. |
It would seem then that either scripts or functions that define functions have a field whose value is the defined function. But, I'm unsure why. It's not used at all in this IR; it's just stored and the function is called using the value that is being stored and not the field. Maybe it's used if an embedded function is called from a function other than the outer function (is that possible?). Can you call |
Looks like that's not possible. Not sure of the reason for this then. |
The question now is whether this should be considered a "mod" in the ModRef analysis ... |
In added test, the points-to set is non-empty, while in mead-baseline, it is empty. In the test:
This is why we're not filtering out this location. |
I wonder why we have an empty points-to set in mead-baseline, or why even having an empty points-to set is important here.... |
In test's pointer analysis:
In mead-baseline:
|
There are other functions that are also nested but have non-empty points-to sets, e.g.:
I am now thinking that this problem is related to wala/ML#91 because the missing functions are decorated. Moreover, they're decorated with a weird decorator that can't be found. |
Indeed, this is the case. If you comment out the decorator, the problem doesn't happen. |
Blocked by wala/ML#91. |
Consider the test added in 438007e. Currently, the ModRef analysis lists the inner function as a heap write of the outer function. Why?
Next Steps
Dump the call graph for the code in this test.
The text was updated successfully, but these errors were encountered: