-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using $~ as an out parameter in Regexp search/match logic.
This fixes issues where threads would step on each others results by updating $~ between the time the match was created deeper in the stack and retrieved higher up. The result was that the match logic would return another thread's MatchData. My fix is to never read $~ in these methods and only ever write it; this does not help the issue (across all impls) where $~ is shared and not reliable across threads, but it should fix issues where it was being used internally to pass MatchData to calls higher in the stack. Fixes JRUBY-7167 and JRUBY-7176.
- Loading branch information
Showing
3 changed files
with
156 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.