-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unwind values are assignable with set-word expressions, SET or SET/any #1515
Comments
Submitted by: Ladislav it is not counterintuitive to R2 users; it always worked: >> error? a: try [1 / 0]
== true |
Submitted by: Ladislav "...It only seems to work with untriggered regular errors and unwinds." - the #771 as well as #1509 both mention, that it is a bug to "leak" triggered errors/unwinds into the Rebol value space, as opposed to untriggered errors/unwinds, where it is OK. Fortunately, taking into account, how error propagation is implemented, triggered regular errors cannot leak into the Rebol value space, only unwinds can. |
Submitted by: BrianH Weird, I've been using SET/any for years to work around this. When did it start working this way in R2? It's always strange when you find out that a standard workaround that you've been doing for an old bug isn't necessary because at some point the bug got fixed without anyone telling you :) I can't dismiss this ticket until #1509 is fixed; until then it is a major security bug. Summary changed accordingly. |
Submitted by: Ladislav in the core-tests suite |
Submitted by: BrianH Based on further testing, SET and SET/any also assign the unwind values, so I changed the summary, description and core-tests suite accordingly. Having the unwind value be passed to the SET function at all is bug #1509, but once it gets the unwind value it certainly shouldn't assign it to anything. |
Submitted by: BrianH
When there is an assignment statement in the evaluation flow of an unwind function (BREAK, CONTINUE, THROW, RETURN or EXIT), the assignment actually happens and the word is set to the unwind pseudo-error value. Strangely enough it doesn't interfere with the unwinding process. Presumably when the assign returns the value being assigned (for chaining) the unwind propagation can continue. Still, the assignment should not happen in this case, since it could be a major security hole (see the example and #1004). Perhaps related to bug #1509.
The preferred course of action would be for the assignment to not happen in this case, just propagate the unwind. That would allow regular errors to be assigned, but would not assign unwinds.
CC - Data [ Version: alpha 97 Type: Bug Platform: All Category: Error Handling Reproduce: Always Fixed-in:r3 master ]
The text was updated successfully, but these errors were encountered: