[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Updated] (JEXL-405) Recursive functions corrupt evaluation frame if reassigned
From:       "Henri Biestro (Jira)" <jira () apache ! org>
Date:       2023-08-31 18:09:00
Message-ID: JIRA.13549192.1693420948000.47984.1693505340009 () Atlassian ! JIRA
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/JEXL-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Henri Biestro updated JEXL-405:
-------------------------------
    Description: 
This issue stems from the special handling recursive functions. A recursive function \
is detected when a lambda is created and assigned to a variable and that variable is \
captured by the lambda. During the assignment, the lambda frame - the captured value \
for the lambda symbol in that frame - is updated with a reference to the lambda \
itself. This can only occur after the lambda is created (obviously). The code that \
handles the special case during assignment does not verify that the caller is indeed \
its creator frame. Thus, if the lambda is assigned to a different variable later on \
in a different scope, that same code will trash the frame with a reference to the \
lambda...


> Recursive functions corrupt evaluation frame if reassigned
> ----------------------------------------------------------
> 
> Key: JEXL-405
> URL: https://issues.apache.org/jira/browse/JEXL-405
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.3.1
> 
> 
> This issue stems from the special handling recursive functions. A recursive \
> function is detected when a lambda is created and assigned to a variable and that \
> variable is captured by the lambda. During the assignment, the lambda frame - the \
> captured value for the lambda symbol in that frame - is updated with a reference to \
> the lambda itself. This can only occur after the lambda is created (obviously). The \
> code that handles the special case during assignment does not verify that the \
> caller is indeed its creator frame. Thus, if the lambda is assigned to a different \
> variable later on in a different scope, that same code will trash the frame with a \
> reference to the lambda...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic