Bug 198501 - Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved
Summary: Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
Keywords: InRadar
Depends on:
Reported: 2019-06-03 15:25 PDT by Keith Rollin
Modified: 2019-06-05 00:37 PDT (History)
4 users (show)

See Also:

Patch (2.78 KB, patch)
2019-06-03 17:58 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-06-03 15:25:13 PDT
keyAndValue.key is a uint64_t, whereas pointerId is a size_t, which is 32-bits on some platforms. This mismatch is normally just a warning, but breaks builds where warnings are treated as errors. Address this mismatch by explicitly casting keyAndValue.key to a size_t.
Comment 1 Radar WebKit Bug Importer 2019-06-03 15:25:29 PDT
Comment 2 Keith Rollin 2019-06-03 15:39:06 PDT
The bit about size_t appears to be incorrect. It looks like PointerID is just an int32_t. I'm now curious as to why this conversion issue doesn't hit all platforms.
Comment 3 Keith Rollin 2019-06-03 16:44:14 PDT
64-to-32 bit conversion warnings are disabled for arm64. That's why most builds succeed. However, some products build for armv7k, which does not disable this conversion. It's the build for this architecture that's failing.

79:GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64*] = NO;
80:GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
Comment 4 Keith Rollin 2019-06-03 17:09:03 PDT
See also Bug 107093.
Comment 5 Keith Rollin 2019-06-03 17:58:50 PDT
Created attachment 371233 [details]
Comment 6 Chris Dumez 2019-06-03 18:26:26 PDT
Comment on attachment 371233 [details]

Comment 7 WebKit Commit Bot 2019-06-04 10:59:58 PDT
Comment on attachment 371233 [details]

Clearing flags on attachment: 371233

Committed r246072: <https://trac.webkit.org/changeset/246072>
Comment 8 WebKit Commit Bot 2019-06-04 10:59:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Antoine Quint 2019-06-05 00:37:31 PDT
Thanks for catching that Keith.