[webkit-dev] Why does RELEASE_ASSERT not have an error message?
JF Bastien
jfb at chromium.org
Wed Feb 22 11:13:30 PST 2017
Do we get the dataLog output in a crash report? It seems useful to have at
a minimum some "reason" enum which ends up in a register, so the crash
report is somewhat helpful, like we do with JIT code.
At that point the release assert might as well capture __LINE__ and other
things in a register, so that crash reporter picks it up.
Not that the dataLog isn't useful -- it is! -- just not as useful if it
isn't in crash reports.
On Wed, Feb 22, 2017 at 11:09 AM, Filip Pizlo <fpizlo at apple.com> wrote:
> I disagree actually. I've lost countless hours to converting this:
>
> RELEASE_ASSERT(blah)
>
> into this:
>
> if (!blah) {
> dataLog("Reason why I crashed");
> RELEASE_ASSERT_NOT_REACHED();
> }
>
> Look in the code - you'll find lots of stuff like this.
>
> I don't think analyzing register state at crashes is more important than
> keeping our code sane.
>
> -Filip
>
>
> > On Feb 21, 2017, at 5:56 PM, Mark Lam <mark.lam at apple.com> wrote:
> >
> > Oh yeah, I forgot about that. I think the register state is more
> important for crash analysis, especially if we can make sure that the
> compiler does not aggregate the int3s. I’ll explore alternatives.
> >
> >> On Feb 21, 2017, at 5:54 PM, Saam barati <sbarati at apple.com> wrote:
> >>
> >> I thought the main point of moving to SIGTRAP was to preserve register
> state?
> >>
> >> That said, there are probably places where we care more about the
> message than the registers.
> >>
> >> - Saam
> >>
> >>> On Feb 21, 2017, at 5:43 PM, Mark Lam <mark.lam at apple.com> wrote:
> >>>
> >>> Is there a reason why RELEASE_ASSERT (and friends) does not call
> WTFReportAssertionFailure() to report where the assertion occur? Is this
> purely to save memory? svn blame tells me that it has been this way since
> the introduction of RELEASE_ASSERT in r140577 many years ago.
> >>>
> >>> Would anyone object to adding a call to WTFReportAssertionFailure() in
> RELEASE_ASSERT() like we do for ASSERT()? One of the upside (side-effect)
> of adding this call is that it appears to stop the compiler from
> aggregating all the RELEASE_ASSERTS into a single code location, and this
> will help with post-mortem crash debugging.
> >>>
> >>> Any thoughts?
> >>>
> >>> Mark
> >>>
> >>> _______________________________________________
> >>> webkit-dev mailing list
> >>> webkit-dev at lists.webkit.org
> >>> https://lists.webkit.org/mailman/listinfo/webkit-dev
> >>
> >
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20170222/7c8a8785/attachment-0001.html>
More information about the webkit-dev
mailing list