I agree.

On 3/27/07, Pavel Rebriy <[EMAIL PROTECTED]> wrote:
Yeah, you are right. Need to remove this assert.

On 27/03/07, Gregory Shimansky <[EMAIL PROTECTED]> wrote:
>
> Pavel Rebriy wrote:
> > I created a JIRA HARMONY-3504 [1] about ThreadGroupTest failure and
> > attached
> > a fixing patch.
>
> I looked at the patch in HARMONY-3504 and I don't quite like it. It
> changes the following assertion
>
> assert(tm_native_thread->request > 0);
>
> to
>
> assert(tm_native_thread->request > 0 ||
> tm_native_thread->safepoint_callback == NULL);
>
> The first version check the condition atomically, and doesn't contain a
> race condtion. But the 2nd version may contain a race condition. You
> need to check that either 1st or 2nd condition is true.
>
> But it may happen that while checking 1st condition only the 2nd is
> true, and while checking the 2nd condition, only 1st is true. So this
> assertion will fail while the whole condition stays true all the time.
> If it is not possible to check the whole condition atomically, probably
> it is necessary to remove this assertion entirely.
>
> > [1] https://issues.apache.org/jira/browse/HARMONY-3504
> >
> > On 27/03/07, Vladimir Ivanov <[EMAIL PROTECTED]> wrote:
> >>
> >> On 3/27/07, Peter Novodvorsky <[EMAIL PROTECTED]> wrote:
> >> > Hello,
> >> >
> >> > Thanks for the log, Vladimir, I'll look at the bug. From my point of
> >> > view we shouldn't rollback  3413, but we should try to fix it right
> >> > now instead.
> >>
> >> Of cause, it is match better than rollback if it requires not too match
> >> time...
>
> --
> Gregory
>
>


--
Best regards,
Pavel Rebriy

Reply via email to