Bug 235573 - [WTF] Make CRASH_WITH_INFO more useful when using GCC
Summary: [WTF] Make CRASH_WITH_INFO more useful when using GCC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks: 233949
  Show dependency treegraph
 
Reported: 2022-01-25 04:23 PST by Adrian Perez
Modified: 2022-01-25 13:11 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.67 KB, patch)
2022-01-25 04:29 PST, Adrian Perez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch v2 (3.01 KB, patch)
2022-01-25 07:57 PST, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2022-01-25 04:23:27 PST
As per the comment in wtf/Assertions.h:

  // GCC does not allow ##__VA_ARGS__ unless GNU extensions are enabled (--std=gnu++NN instead of
  // --std=c++NN) and I think we don't want that, so we'll have a fallback path for GCC. Obviously
  // this will not actually succeed at getting the desired info into registers before crashing, but
  // it's just a fallback anyway.
  //
  // FIXME: When we enable C++20, we should replace ##__VA_ARGS__ with format __VA_OPT__(,) __VA_ARGS__
  // so that we can remove this fallback.

Nowadays we are passing -std=c++20 to the compiler, so we can use __VA_OPT__ and remove the FIXME.
Comment 1 Adrian Perez 2022-01-25 04:29:04 PST
Created attachment 449917 [details]
Patch
Comment 2 Michael Catanzaro 2022-01-25 07:26:59 PST
Comment on attachment 449917 [details]
Patch

WinCairo and Windows EWS are red. Maybe we need to wait for Visual Studio 2022?
Comment 3 Adrian Perez 2022-01-25 07:48:03 PST
(In reply to Michael Catanzaro from comment #2)
> Comment on attachment 449917 [details]
> Patch
> 
> WinCairo and Windows EWS are red. Maybe we need to wait for Visual Studio
> 2022?

Probably, but we can keep using ##__VA_ARGS__ with MSVC, and go with
__VA_OPT__(,) __VA_ARGS__ for GCC/Clang. I'm going to update the patch
to try that.
Comment 4 Adrian Perez 2022-01-25 07:57:13 PST
Created attachment 449930 [details]
Patch v2
Comment 5 EWS 2022-01-25 13:10:50 PST
Committed r288577 (246400@main): <https://commits.webkit.org/246400@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449930 [details].
Comment 6 Radar WebKit Bug Importer 2022-01-25 13:11:19 PST
<rdar://problem/88040547>