Bug 194772 - [ARM] Fix crash with sampling profiler
Summary: [ARM] Fix crash with sampling profiler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-18 01:58 PST by Dominik Inführ
Modified: 2019-02-19 09:03 PST (History)
8 users (show)

See Also:


Attachments
Patch (3.83 KB, patch)
2019-02-18 02:21 PST, Dominik Inführ
no flags Details | Formatted Diff | Diff
Patch (3.83 KB, patch)
2019-02-18 02:22 PST, Dominik Inführ
no flags Details | Formatted Diff | Diff
Patch (3.76 KB, patch)
2019-02-18 13:49 PST, Dominik Inführ
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Inführ 2019-02-18 01:58:15 PST
[ARM] Fix crash with sampling profiler
Comment 1 Dominik Inführ 2019-02-18 02:21:33 PST
Created attachment 362275 [details]
Patch
Comment 2 Dominik Inführ 2019-02-18 02:22:32 PST
Created attachment 362276 [details]
Patch
Comment 3 Mark Lam 2019-02-18 09:50:51 PST
Comment on attachment 362276 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=362276&action=review

r=me with fix.

> Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:181
> +        if (dest == ARMRegisters::sp) {

This is incorrect.  You only need this alternative codegen if (dest == ARMRegisters::sp && src != dest).  If (dest == ARMRegisters::sp && src == dest), the implementation below would generate more optimal code.  For details, see add(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) in ARMv7Assembler.h.
Comment 4 Dominik Inführ 2019-02-18 13:49:57 PST
Created attachment 362327 [details]
Patch
Comment 5 Dominik Inführ 2019-02-18 22:56:43 PST
Thank you very much for the review! I've extended the condition to also check for `src != dest`.
Comment 6 WebKit Commit Bot 2019-02-18 23:16:03 PST
Comment on attachment 362327 [details]
Patch

Clearing flags on attachment: 362327

Committed r241756: <https://trac.webkit.org/changeset/241756>
Comment 7 WebKit Commit Bot 2019-02-18 23:16:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-02-19 09:03:22 PST
<rdar://problem/48201956>