-
Notifications
You must be signed in to change notification settings - Fork 351
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
interp: recover in Eval and EvalPath #1560
base: master
Are you sure you want to change the base?
Commits on Oct 8, 2023
-
interp: recover in Eval and EvalPath
Now Eval() and EvalPath() recover from internal panic and return it as error with call stacks. This fixes the case where user code calls os.Exit(1), which is converted to panic() and breaks down the program.
Configuration menu - View commit details
-
Copy full SHA for 48f8875 - Browse repository at this point
Copy the full SHA 48f8875View commit details
Commits on Jul 13, 2024
-
fix: do not panic when assigning to _ (blank) var.
Fix interp.isEmptyInterface to tolerate a nil type. Fixes traefik#1619
Configuration menu - View commit details
-
Copy full SHA for 3f6b949 - Browse repository at this point
Copy the full SHA 3f6b949View commit details -
fix: avoid memory leak in closure
Simplify frame management. Remove node dependency on frame pointer. Fixes traefik#1618
Configuration menu - View commit details
-
Copy full SHA for d9d2d61 - Browse repository at this point
Copy the full SHA d9d2d61View commit details -
fix: don't panic in map range if assigned value is _
Ensure that the code generated for `for s, _ = range ...` is the same as `for s = range ...`. Fixes traefik#1622.
Configuration menu - View commit details
-
Copy full SHA for 8e18c46 - Browse repository at this point
Copy the full SHA 8e18c46View commit details -
interp: allow assignment to exported variables
If you `(*interp.Interpreter).Use` a variable, you should be able to assign to it. Fixes traefik#1623
Configuration menu - View commit details
-
Copy full SHA for 9ed60ff - Browse repository at this point
Copy the full SHA 9ed60ffView commit details
Commits on Oct 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 86d4fa1 - Browse repository at this point
Copy the full SHA 86d4fa1View commit details -
interp: fix mismatch assign statement panic
Follow by the [Spec](https://go.dev/ref/spec#Assignment_statements): The number of operands on the left hand side must match the number of values. For instance, if f is a function returning two values `x, y = f()` assigns the first value to x and the second to y. In the second form, the number of operands on the left must equal the number of expressions on the right, each of which must be single-valued, and the nth expression on the right is assigned to the nth operand on the left. Fixes traefik#1606
Configuration menu - View commit details
-
Copy full SHA for bf5850f - Browse repository at this point
Copy the full SHA bf5850fView commit details -
fix for issue traefik#1634 -- for passing a closure to exported Go fu…
…nction This fixes issue traefik#1634 includes special case for defer function. I could remove or significantly reduce the comment description, and just have that here for future reference: // per traefik#1634, if v is already a func, then don't re-wrap! critically, the original wrapping // clones the frame, whereas the one here (below) does _not_ clone the frame, so it doesn't // generate the proper closure capture effects! // this path is the same as genValueAsFunctionWrapper which is the path taken above if // the value has an associated node, which happens when you do f := func() ..
Configuration menu - View commit details
-
Copy full SHA for 3efbf2b - Browse repository at this point
Copy the full SHA 3efbf2bView commit details -
automatic loop variables in for loops ("loop var"), consistent with g…
…o 1.22 behavior This builds on traefik#1644 and adds automatic per-loop variables that are consistent with go 1.22 behavior. See traefik#1643 for discussion. This is still a draft because the for7 version ends up capturing the per-loop var values when they are +1 relative to what they should be. Maybe somehow the incrementing and conditional code is somehow capturing the within loop variables and incrementing them? not sure how that would work. anyway, need to investigate further before this is ready to go, but pushing it here in case there are other issues or someone might figure out this bug before I do..
Configuration menu - View commit details
-
Copy full SHA for 40a459c - Browse repository at this point
Copy the full SHA 40a459cView commit details -
interp: fix a missing implicit type conversion for binary expression
When parsing binary operator expressions, make sure that implicit type conversions for untyped expressions are performed. It involves walking the sub-expression subtree at post-processing of binary expressions. Fixes traefik#1653.
Configuration menu - View commit details
-
Copy full SHA for ee47504 - Browse repository at this point
Copy the full SHA ee47504View commit details