Files
stambha/guest/stela-gpu
Garvit Surana 3168b12bba fix(gpu): make newBufferWithBytesNoCopy: of an address within a page over the pages around it, starting the buffer that far in (wire minor 1, NewImportedBufferAt), where its nil crashed mediaanalysisd every few minutes on dev64 and each crash ran ReportCrash
Espresso, which mediaanalysisd runs its models with when there is no
Neural Engine, makes 16-byte no-copy buffers 8 bytes into a page
(0x781827ff58 at 725.9 s of dev64's test 4 boot). The frontend wired
[bytes, bytes + 16 KiB), the gate refused ranges that are not whole
pages, Metal answered nil and mediaanalysisd crashed 0.5 s later. It
crashed five times in 30 minutes, ReportCrashService restarting eleven
times to report them.

The frontend now imports the whole pages around the bytes and asks for a
buffer offset bytes into them. The VkBuffer starts at the driver's buffer
alignment below the bytes and the Metal buffer where they are: commands
take the start as the buffer's offset in its VkBuffer, as they do for
upload suballocations, and its address is the bytes'. Textures over such
a buffer are refused, as their rows are addressed from the VkBuffer's
start. A page-aligned address imports as before.
2026-11-27 11:51:04 +00:00
..