-
Notifications
You must be signed in to change notification settings - Fork 28
no literal callback for top-level function declarations in eval'd string #82
Comments
var f = eval("function u(s) { console.log(s); } u("Hello");"); won't work if I add the call to J$.N and J$.T as a statement before the function definition.
|
I'm not sure what the right fix is here. But if we can at least add the |
Is the issue the requirement for an expression context? (without instrumentation first) var f = (eval("var u"), u = function u(s) { console.log(s); }, u("Hello")); With instrumentation: var f = (eval("var u"),
u = J$.T(..., function u(s) {...}, ),
u = J$.N(..., u),
J$.F(..., J$.R(...u...), ..., J$.T(...))); |
To confirm, this bug is fixed in jalangi2. |
Consider the following script:
When executing the instrumented version of the script, here is the instrumented code that I see for the eval'd string:
The bug is that there is no
J$.T
call corresponding to the creation of the functionu
. This leads to my analysis seeing thefunctionEnter
callback for the call tou
without ever having seen aliteral
callback foru
, which is problematic.The text was updated successfully, but these errors were encountered: