{"object_kind":"push","event_name":"push","before":"91b764faac64a2a264527127cf2790cbcdd08de0","after":"0b08468035f1a4194dbb53bc3d60d6077f011be2","ref":"refs/heads/master","ref_protected":true,"checkout_sha":"0b08468035f1a4194dbb53bc3d60d6077f011be2","message":null,"user_id":3060,"user_name":"Wim Taymans","user_username":"wtaymans","user_email":"","user_avatar":"https://secure.gravatar.com/avatar/ee99737f7492c79c3a9be75f2e2437f2c944c95fca1480fafcd7ce3bf8c85784?s=80&d=identicon","project_id":4753,"project":{"id":4753,"name":"pipewire","description":"Multimedia processing graphs","web_url":"https://gitlab.freedesktop.org/pipewire/pipewire","avatar_url":"https://gitlab.freedesktop.org/uploads/-/system/project/avatar/4753/pipewire.png","git_ssh_url":"git@ssh.gitlab.freedesktop.org:pipewire/pipewire.git","git_http_url":"https://gitlab.freedesktop.org/pipewire/pipewire.git","namespace":"PipeWire","visibility_level":20,"path_with_namespace":"pipewire/pipewire","default_branch":"master","ci_config_path":"","homepage":"https://gitlab.freedesktop.org/pipewire/pipewire","url":"git@ssh.gitlab.freedesktop.org:pipewire/pipewire.git","ssh_url":"git@ssh.gitlab.freedesktop.org:pipewire/pipewire.git","http_url":"https://gitlab.freedesktop.org/pipewire/pipewire.git"},"commits":[{"id":"9d01a26242f8aba6a2bd2e836735f61d8933b88b","message":"pipewire: mem: forward declare `spa_hook`\n\nThis type is used in function arguments, so forward declare it.\n","title":"pipewire: mem: forward declare `spa_hook`","timestamp":"2025-09-08T11:38:42+00:00","url":"https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/9d01a26242f8aba6a2bd2e836735f61d8933b88b","author":{"name":"Barnabás Pőcze","email":"pobrn@protonmail.com"},"added":[],"modified":["src/pipewire/mem.h"],"removed":[]},{"id":"93774b1d149323a72a0f094d589e95e3f9404968","message":"pipewire: mem: log page size on creation\n","title":"pipewire: mem: log page size on creation","timestamp":"2025-09-08T11:38:42+00:00","url":"https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/93774b1d149323a72a0f094d589e95e3f9404968","author":{"name":"Barnabás Pőcze","email":"pobrn@protonmail.com"},"added":[],"modified":["src/pipewire/mem.c"],"removed":[]},{"id":"0b08468035f1a4194dbb53bc3d60d6077f011be2","message":"pipewire: mem: pw_memblock_map(): fix pointer when reusing mapping\n\nPreviously the pointer was determined as follows:\n\n mm->this.ptr = SPA_PTROFF(m->ptr, range.start, void);\n\nhowever, when `pw_map_range` is calculated, `pw_map_range::start` is the offset\nfrom the beginning of the first page, starting at `pw_map_range::offset`.\n\nThis works correctly if `memblock_map()` runs because that will map the file\nwith expected offset, so using `range.start` is correct.\n\nHowever, when a mapping is reused (i.e. `memblock_find_mapping()`) finds something,\nthen `range.start` is not necessarily correct. Consider the following example:\n\n * page size is 10\n * one memblock with size 20 (2 pages)\n * the applications wants to mappings:\n * (offset=5,size=10)\n * (offset=15,size=5)\n\nAfter the first request from the application, a `mapping` object is created\nthat covers the first two pages of the memblock: offset=0 and size=20. During\nthe second request, the calculated `pw_map_range` is as follows:\n\n { start = 5, offset = 10, size = 10 }\n\nand the only previously created mapping is reused since (0 <= 5) and (10 <= 20). When\nthe pointer of the mapping is adjusted afterwards it will be incorrect since `m->ptr`\npoints to byte 0 on page 0 (instead of byte 0 on page 1 -- that is assumed). Thereforce\nthe two will unexpectedly overlap.\n\nFix that by using `offset - m->offset` when adjusting the mapping's pointer. Also move\nthe `range` variable into a smaller scope because it only makes sense there. And add\na test that check the above previously incorrect case.\n\nFixes: 2caf81c97c0aee (\"mem: improve memory handling\")\nFixes #4884\n","title":"pipewire: mem: pw_memblock_map(): fix pointer when reusing mapping","timestamp":"2025-09-08T11:38:42+00:00","url":"https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/0b08468035f1a4194dbb53bc3d60d6077f011be2","author":{"name":"Barnabás Pőcze","email":"pobrn@protonmail.com"},"added":["test/test-mempool.c"],"modified":["src/pipewire/mem.c","test/meson.build"],"removed":[]}],"total_commits_count":3,"push_options":{},"repository":{"name":"pipewire","url":"git@ssh.gitlab.freedesktop.org:pipewire/pipewire.git","description":"Multimedia processing graphs","homepage":"https://gitlab.freedesktop.org/pipewire/pipewire","git_http_url":"https://gitlab.freedesktop.org/pipewire/pipewire.git","git_ssh_url":"git@ssh.gitlab.freedesktop.org:pipewire/pipewire.git","visibility_level":20}}