mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-08 13:50:36 +01:00
exa: use dixRegisterPrivateKey to create PRIVATE PIXMAP
[WHY] There is a chance of a coredump occurring when stopping Xorg, the specific information is as follows: raise () from /lib/loongarch64-linux-gnu/libc.so.6 abort () from /lib/loongarch64-linux-gnu/libc.so.6 ?? () from /lib/loongarch64-linux-gnu/libc.so.6 __assert_fail () from /lib/loongarch64-linux-gnu/libc.so.6 dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=0xaab99cfea0) at ../../../../include/privates.h:121 dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=<optimized out>) at ../../../../exa/exa_driver.c:205 dixGetPrivate (key=<optimized out>, privates=<optimized out>) at ../../../../include/privates.h:136 exaDestroyPixmap_driver (pPixmap=<optimized out>) at ../../../../exa/exa_driver.c:195 FreePicture (pid=0, value=0xaab9fbf380) at ../../../../render/picture.c:1416 FreePicture (value=0xaab9fbf380, pid=pid@entry=0) at ../../../../render/picture.c:1379 exaUnrealizeGlyphCaches (pScreen=pScreen@entry=0xaab99cfad0, format=<optimized out>) at ../../../../exa/exa_glyphs.c:130 exaGlyphsFini (pScreen=pScreen@entry=0xaab99cfad0) at ../../../../exa/exa_glyphs.c:246 exaCloseScreen (pScreen=0xaab99cfad0) at ../../../../exa/exa.c:746 present_close_screen (screen=0xaab99cfad0) at ../../../../present/present_screen.c:70 CursorCloseScreen (pScreen=0xaab99cfad0) at ../../../../xfixes/cursor.c:205 This is because the screen specific private key has already been released by dixFreeScreenSpecificPrivates() function before calling ->CloseScreen(). [HOW] use dixRegisterPrivateKey to create PRIVATE PIXMAP. Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
This commit is contained in:
parent
dd5c2595a4
commit
85d6380e6b
2 changed files with 4 additions and 4 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include "exa.h"
|
||||
|
||||
DevPrivateKeyRec exaScreenPrivateKeyRec;
|
||||
DevPrivateKeyRec exaPixmapPrivateKeyRec;
|
||||
|
||||
#ifdef MITSHM
|
||||
static ShmFuncs exaShmFuncs = { NULL, NULL };
|
||||
|
|
@ -945,8 +946,7 @@ exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo)
|
|||
* Hookup offscreen pixmaps
|
||||
*/
|
||||
if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) {
|
||||
if (!dixRegisterScreenSpecificPrivateKey
|
||||
(pScreen, &pExaScr->pixmapPrivateKeyRec, PRIVATE_PIXMAP,
|
||||
if (!dixRegisterPrivateKey(&exaPixmapPrivateKeyRec, PRIVATE_PIXMAP,
|
||||
sizeof(ExaPixmapPrivRec))) {
|
||||
LogMessage(X_WARNING,
|
||||
"EXA(%d): Failed to allocate pixmap private\n",
|
||||
|
|
|
|||
|
|
@ -210,11 +210,11 @@ typedef struct {
|
|||
PixmapPtr srcPix;
|
||||
PixmapPtr maskPix;
|
||||
|
||||
DevPrivateKeyRec pixmapPrivateKeyRec;
|
||||
DevPrivateKeyRec gcPrivateKeyRec;
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
extern DevPrivateKeyRec exaScreenPrivateKeyRec;
|
||||
extern DevPrivateKeyRec exaPixmapPrivateKeyRec;
|
||||
|
||||
#define exaScreenPrivateKey (&exaScreenPrivateKeyRec)
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ extern DevPrivateKeyRec exaScreenPrivateKeyRec;
|
|||
#define EXA_PIXMAP_SCORE_PINNED 1000
|
||||
#define EXA_PIXMAP_SCORE_INIT 1001
|
||||
|
||||
#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &ExaGetScreenPriv((p)->drawable.pScreen)->pixmapPrivateKeyRec))
|
||||
#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&p->devPrivates, &exaPixmapPrivateKeyRec))
|
||||
#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
|
||||
|
||||
#define EXA_RANGE_PITCH (1 << 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue