Closed khatchad closed 5 months ago
If I revert 1c88d8682ec042f65ce63ded26b24462ac282b06, now I see core()
.
But the problem is that for simpler decorators, visiting the annotation in the IR translator invoke the decorator function without sending a parameter. We basically get null for the function to invoke.
Since we can't expand *args
and **kwargs
anyway, it make sense to leave this broken for now and go with the simpler case.
On second thought, I don't think it makes a ton of sense just to swap problems here. I reverted the change in 2a6e5226db8ffb9aa8a4fd5dde637a452b55bbb2,
Related to https://github.com/wala/ML/issues/188.
Consider the following code:
The above seems to be a common pattern for decorators that take arguments and whose decoratorated functions also take arguments. To do this, you nest the functions three levels deep. What happens in Ariadne, however, is that we only "peel" back two of these. The following IR is produced from the above code on 644c562f26f6ce5243dba770786c799986177650:
The invoked function at the very end if actually not
f()
but the middle function:The
core()
function should be called, but it's not:The points-to analysis:
I see
core()
there, but's not invoked. Looks to me like need one more function invocation here.