[Webkit-unassigned] [Bug 125023] New: Apparent race condition (in synchronous code) --- Possible duplicate
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 29 17:10:55 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=125023
Summary: Apparent race condition (in synchronous code) ---
Possible duplicate
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.9
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: caitpotter88 at gmail.com
CC: caitpotter88 at gmail.com
When investigating an AngularJS issue: https://github.com/angular/angular.js/issues/5192 https://github.com/angular/angular.js/pull/5193, weird behaviour is observed on OSX 10.9 + Safari 7 (and also reported to happen on webkit-based browsers on Ubuntu 13.10).
I'm not quite sure how to describe this weird behaviour, but as can be seen from my comments on the bugs, it appears that an assignment to a RegExp match array before a conditional branch is not executed. Several solutions worked:
1) building an array `parts = ['', parts[1], parts[2], parts[3]]`
2) moving the assignment to after the conditional branch
What made it particularly interesting is that, when stepping through expression by expression in the debugger, the problem would not happen (the assignment occurs and the first value of the matches array is cleared correctly), only when it's not "observed" in the debugger does the unexpected behaviour happen. Sort of a quantum mechanics related bug, clearly.
So, maybe it's some sort of race condition where script contexts are executing different statements in parallel for some reason (but I can't think of a good reason why this would happen at all), or some kind of optimization error?
This issue may have been reported before, but because I'm not exactly certain of the cause, I find it difficult to track down similar issues.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list