macOS Sierra warning: Internals of CFAllocator blah (45650) |
|||||||
Issue descriptionSplit from bug 626534 , but not just using 45650 so that we can have an independent bug that’s on the right hotlist for tracking. [0707/201006:WARNING:memory_mac.mm(531)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650 We never even got CF source for 10.11, but I recall that we validated things through other means for 10.10 and 10.11 at least, way before we would have had source access.
,
Jul 8 2016
Moving this nonessential bug to the next milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 8 2016
I hoppered the structure on 10.12dp2 and compared that to 10.11.5 and the last CF source release we have, CF-1153.18 from 10.10.3. The hops are below.
The struct appears to be unchanged in this OS version. Notably, the version at offset 104 is 6 in all cases, the struct is the same size at 208 bytes, and all of the pointers go to all of the same places. I believe that we can treat 10.12’s __CFAllocator as ChromeCFAllocatorLions.
10.12dp2 16A239j:
___kCFAllocatorSystemDefault:
00000000005c7700 dq 0x0000000000000000
00000000005c7708 dq 0x0000000000000080
00000000005c7710 dq 0x000000000012a890 ; __CFAllocatorCustomSize
00000000005c7718 dq 0x000000000012a8a0 ; __CFAllocatorCustomMalloc
00000000005c7720 dq 0x000000000012a930 ; __CFAllocatorCustomCalloc
00000000005c7728 dq 0x000000000012a9d0 ; __CFAllocatorCustomValloc
00000000005c7730 dq 0x000000000012aa80 ; __CFAllocatorCustomFree
00000000005c7738 dq 0x000000000012ab10 ; __CFAllocatorCustomRealloc
00000000005c7740 dq 0x000000000012ab20 ; __CFAllocatorNullDestroy
00000000005c7748 dq 0x00000000003c0987 ; "kCFAllocatorSystemDefault"
00000000005c7750 dq 0x0000000000000000
00000000005c7758 dq 0x0000000000000000
00000000005c7760 dq 0x000000000048eca0 ; __CFAllocatorZoneIntrospect
00000000005c7768 dd 0x00000006
00000000005c776c db 0x00
00000000005c776d db 0x00
00000000005c776e db 0x00
00000000005c776f db 0x00
00000000005c7770 dq 0x0000000000000000
00000000005c7778 dq 0x0000000000000000
00000000005c7780 dq 0x0000000000000000
00000000005c7788 dq 0x0000000000000000
00000000005c7790 dq 0x0000000000000000
00000000005c7798 dq 0x0000000000000000
00000000005c77a0 dq 0x0000000000000000
00000000005c77a8 dq 0x0000000000000000
00000000005c77b0 dq 0x0000000000004010 ; __CFAllocatorSystemAllocate
00000000005c77b8 dq 0x000000000009d170 ; __CFAllocatorSystemReallocate
00000000005c77c0 dq 0x00000000000184e0 ; __CFAllocatorSystemDeallocate
00000000005c77c8 dq 0x0000000000000000
___kCFAllocatorMalloc:
10.11.5 15F34:
___kCFAllocatorSystemDefault:
00000000005ab440 dq 0x0000000000000000
00000000005ab448 dq 0x0000000000000080
00000000005ab450 dq 0x0000000000137700 ; __CFAllocatorCustomSize
00000000005ab458 dq 0x0000000000137710 ; __CFAllocatorCustomMalloc
00000000005ab460 dq 0x0000000000137720 ; __CFAllocatorCustomCalloc
00000000005ab468 dq 0x0000000000137750 ; __CFAllocatorCustomValloc
00000000005ab470 dq 0x00000000001377a0 ; __CFAllocatorCustomFree
00000000005ab478 dq 0x0000000000137830 ; __CFAllocatorCustomRealloc
00000000005ab480 dq 0x0000000000137840 ; __CFAllocatorNullDestroy
00000000005ab488 dq 0x00000000003a8d4c ; "kCFAllocatorSystemDefault"
00000000005ab490 dq 0x0000000000000000
00000000005ab498 dq 0x0000000000000000
00000000005ab4a0 dq 0x00000000005ab790 ; __CFAllocatorZoneIntrospect
00000000005ab4a8 dd 0x00000006
00000000005ab4ac db 0x00
00000000005ab4ad db 0x00
00000000005ab4ae db 0x00
00000000005ab4af db 0x00
00000000005ab4b0 dq 0x0000000000000000
00000000005ab4b8 dq 0x0000000000000000
00000000005ab4c0 dq 0x0000000000000000
00000000005ab4c8 dq 0x0000000000000000
00000000005ab4d0 dq 0x0000000000000000
00000000005ab4d8 dq 0x0000000000000000
00000000005ab4e0 dq 0x0000000000000000
00000000005ab4e8 dq 0x0000000000000000
00000000005ab4f0 dq 0x0000000000003710 ; __CFAllocatorSystemAllocate
00000000005ab4f8 dq 0x00000000000a1f20 ; __CFAllocatorSystemReallocate
00000000005ab500 dq 0x0000000000019920 ; __CFAllocatorSystemDeallocate
00000000005ab508 dq 0x0000000000000000
___kCFAllocatorMalloc:
,
Jul 8 2016
https://codereview.chromium.org/2129273002/
,
Jul 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fd1cb64d5070bd041e86434e91a8cca796414367 commit fd1cb64d5070bd041e86434e91a8cca796414367 Author: mark <mark@chromium.org> Date: Fri Jul 08 19:58:59 2016 mac: Update knowledge of CFAllocator internals for 10.12 For each new major OS version, we need to poke at the internals of CFAllocator to enable the out-of-memory killer for the default CFAllocator implementations. This update is for macOS 10.12 ("Sierra"), whose CFAllocator internals are unchanged from 10.11 (and from 10.9, and in fact from 10.7). It also updates the base::mac::IsOS*() family of functions for this new OS version. BUG= 626536 ,45650 TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis Review-Url: https://codereview.chromium.org/2129273002 Cr-Commit-Position: refs/heads/master@{#404471} [modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util.h [modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util.mm [modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util_unittest.mm [modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/process/memory_mac.mm
,
Jul 8 2016
,
Jul 8 2016
FYI, https://bugs.chromium.org/p/chromium/issues/detail?id=45650#c4 has a test app that I used a few times, not requiring source.
,
Jul 8 2016
Thanks. That produces mark@garbage bash$ cc 45650.m -o 45650-32 -arch i386 -framework Foundation mark@garbage bash$ cc 45650.m -o 45650-64 -arch x86_64 -framework Foundation mark@garbage bash$ ./45650-32 This is Mac OS X 10.12 (16A239j), running in 32-bit mode. CFAllocatorContext offset is 68, expected for Mac OS X 10.7-10.8 mark@garbage bash$ ./45650-64 This is Mac OS X 10.12 (16A239j), running in 64-bit mode. CFAllocatorContext offset is 136, expected for Mac OS X 10.7-10.8 as expected. Except is’s macOS now. :)
,
Jul 8 2016
And we don't care about 32-bit any more. But still, very confirmed.
,
Jul 9 2016
Your change meets the bar and is auto-approved for M53 (branch: 2785)
,
Jul 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bddd17b05548466f7995d583686f479bc107f140 commit bddd17b05548466f7995d583686f479bc107f140 Author: Mark Mentovai <mark@chromium.org> Date: Sun Jul 10 03:04:43 2016 mac: Update knowledge of CFAllocator internals for 10.12 For each new major OS version, we need to poke at the internals of CFAllocator to enable the out-of-memory killer for the default CFAllocator implementations. This update is for macOS 10.12 ("Sierra"), whose CFAllocator internals are unchanged from 10.11 (and from 10.9, and in fact from 10.7). It also updates the base::mac::IsOS*() family of functions for this new OS version. BUG= 626536 ,45650 TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis Review-Url: https://codereview.chromium.org/2129273002 Cr-Commit-Position: refs/heads/master@{#404471} (cherry picked from commit fd1cb64d5070bd041e86434e91a8cca796414367) Review URL: https://codereview.chromium.org/2136813002 . Cr-Commit-Position: refs/branch-heads/2785@{#68} Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382} [modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util.h [modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util.mm [modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util_unittest.mm [modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/process/memory_mac.mm |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by mark@chromium.org
, Jul 8 2016