Closed
Bug 546415
Opened 15 years ago
Closed 7 years ago
If you call VMPI_lockRelease twice on the same lock we should assert/crash
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: treilly, Unassigned)
Details
Attachments
(3 files)
4.09 KB,
patch
|
treilly
:
review+
edwsmith
:
review+
|
Details | Diff | Splinter Review |
12.27 KB,
patch
|
treilly
:
review+
edwsmith
:
review+
|
Details | Diff | Splinter Review |
1.93 KB,
patch
|
treilly
:
review+
edwsmith
:
review+
|
Details | Diff | Splinter Review |
Right now it just silently ignores the second lock release call
Assignee: nobody → treilly
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: Future → flash10.1
Comment 2•15 years ago
|
||
Poaching, I'm currently looking into a related bug, we need to nail down the VMPI for this properly.
Assignee: treilly → lhansen
Comment 3•15 years ago
|
||
Changes documentation / semantics to being less lenient / easier to implement / less error prone; locks that are used when they're not in the appropriate state will cause asserts in debug builds. This includes locking locked locks, unlocking unlocked locks, and unlocking locks held by other threads. I need to know if this is too draconian.
Note I've dispensed with the return values for lockAcquire and lockRelease; they were almost never being checked, and when they were checked they were checked by GCAssert. Instead the assertions in the platform layer make sure that that kind of checking is always happening.
Updates to the platform layers as well as to vm code will follow.
Attachment #444098 -
Flags: review?(treilly)
Attachment #444098 -
Flags: review?(edwsmith)
Comment 4•15 years ago
|
||
This diff probably looks bigger than it is. The changes are:
- changes in return types from bool to void in a couple of cases
- debug code on all platforms
- change in how the unix implementation is factored.
Tested on Mac only so far, consider it a little preliminary but good enough to review. On Mac it appears to uncover a bug; regress/bug_515935.abc apparently leaves a lock hanging during OOM abort and that triggers an assert. That probably means FixedMalloc needs to set up an unwind handler, but the bigger question is whether there are going to be similar problems for OOM handling elsewhere.
Attachment #444099 -
Flags: review?(treilly)
Attachment #444099 -
Flags: review?(edwsmith)
Comment 5•15 years ago
|
||
Very gentle changes resulting from no longer returning values from VMPI_lockAcquire and VMPI_lockRelease.
Attachment #444100 -
Flags: review?(treilly)
Attachment #444100 -
Flags: review?(edwsmith)
Updated•15 years ago
|
Attachment #444098 -
Flags: review?(edwsmith) → review+
Comment 6•15 years ago
|
||
Comment on attachment 444098 [details] [diff] [review]
New VMPI spec for locking primitives
Adding simon for feedback since this relates to bug 555760 which adds more VMPI concurrency apis.
Attachment #444098 -
Flags: feedback?(siwilkin)
Updated•15 years ago
|
Attachment #444099 -
Flags: review?(edwsmith) → review+
Updated•15 years ago
|
Attachment #444100 -
Flags: review?(edwsmith) → review+
Updated•15 years ago
|
Whiteboard: has-patch
Comment 7•15 years ago
|
||
One comment:
For VMPI_lockDestroy I can see the utility of documenting: "..The lock must not be held by any thread when this function is called."
But trying to actually ASSERT it is a race-condition.
Reporter | ||
Updated•15 years ago
|
Attachment #444098 -
Flags: review?(treilly) → review+
Reporter | ||
Comment 8•15 years ago
|
||
Comment on attachment 444099 [details] [diff] [review]
Implementation of VMPI locking primitives
rubber stamping, gave it a quick scan, just noticed that VMPI_lockRelease for mac has an = that should be a ==
Attachment #444099 -
Flags: review?(treilly) → review+
Reporter | ||
Updated•15 years ago
|
Attachment #444100 -
Flags: review?(treilly) → review+
Comment 9•15 years ago
|
||
(In reply to comment #8)
> (From update of attachment 444099 [details] [diff] [review])
> rubber stamping, gave it a quick scan, just noticed that VMPI_lockRelease for
> mac has an = that should be a ==
That bug appears elsewhere in the patch, e.g. in symbian-platform.h ...
Comment 10•15 years ago
|
||
(In reply to comment #7)
> One comment:
> For VMPI_lockDestroy I can see the utility of documenting: "..The lock must not
> be held by any thread when this function is called."
> But trying to actually ASSERT it is a race-condition.
It's a race, but isn't it a benign one, in that the assert does not catch all the cases where the invariant is violated, but when it does fire there's definitely a violation?
Comment 11•15 years ago
|
||
(Patch can't land without considering the need for an unwind handler around the FixedMalloc locks, at a minimum, and the consequences for the Flash Player are not understood.)
Comment 12•15 years ago
|
||
(In reply to comment #9)
> (In reply to comment #8)
> > (From update of attachment 444099 [details] [diff] [review] [details])
> > rubber stamping, gave it a quick scan, just noticed that VMPI_lockRelease for
> > mac has an = that should be a ==
>
> That bug appears elsewhere in the patch, e.g. in symbian-platform.h ...
I checked all the files and I found those two cases, no others.
Updated•15 years ago
|
Attachment #444098 -
Flags: feedback?(siwilkin)
Comment 13•15 years ago
|
||
(Removing has-patch since we're still blocked on a reasonable unwind handler, see comment #11.)
Whiteboard: has-patch
Comment 14•15 years ago
|
||
Removing targeting and unassigning; it's not clear that fixing this is actually desirable - ignoring the second call might be the right thing to do, or at most print a message in debug mode.
Assignee: lhansen → nobody
Status: ASSIGNED → NEW
Priority: P3 → --
Target Milestone: flash10.2 → ---
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•