Created attachment 19010 [details] [review] half-hearted demo patch which makes valgrind shutup in src/glx/x11/drisw_glx.c const __DRIconfig **driver_configs; psc->swrast->createNewScreen(screen, loader_extensions, &driver_configs, psc); allocates space for the driver_configs which never get released afaics valgrind gives... ==25950== 7,304 (392 direct, 6,912 indirect) bytes in 1 blocks are definitely lost in loss record 201 of 257 ==25950== at 0x4A0739E: malloc (vg_replace_malloc.c:207) ==25950== by 0xC0A17BD: driConcatConfigs (utils.c:749) ==25950== by 0xC0A2517: driCreateNewScreen (swrast.c:218) ==25950== by 0xBC52B0B: driCreateScreen (drisw_glx.c:385) ==25950== by 0xBC39656: __glXInitialize (glxext.c:618) ==25950== by 0xBC35BF1: GetGLXPrivScreenConfig (glxcmds.c:184) ==25950== by 0xBC3670A: glXGetConfig (glxcmds.c:906)
(In reply to comment #0) > Created an attachment (id=19010) [details] > half-hearted demo patch which makes valgrind shutup > > in src/glx/x11/drisw_glx.c > > const __DRIconfig **driver_configs; > > psc->swrast->createNewScreen(screen, > loader_extensions, &driver_configs, psc); > > allocates space for the driver_configs which never get released afaics > You are right that they are not freed. The problem exists for actual DRI drivers also and for other loaders (xserver/glx ...). So unless the configs are used by the loader after screen destruction time, I think that they should be freed by the common dri code under src/mesa/drivers/dri/common in the .DestroyScreen hook.
(In reply to comment #1) > (In reply to comment #0) > > Created an attachment (id=19010) [details] [details] > > half-hearted demo patch which makes valgrind shutup > > > > in src/glx/x11/drisw_glx.c > > > > const __DRIconfig **driver_configs; > > > > psc->swrast->createNewScreen(screen, > > loader_extensions, &driver_configs, psc); > > > > allocates space for the driver_configs which never get released afaics > > > > You are right that they are not freed. The problem exists for actual DRI > drivers also and for other loaders (xserver/glx ...). > > So unless the configs are used by the loader after screen destruction time, I > think that they should be freed by the common dri code under > src/mesa/drivers/dri/common in the .DestroyScreen hook. > I don't have the time to look into the code right now, but I had this patch merged once http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa5b0364f90be19bb0e1915f1eea691d06fb8929
Also have a look at: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce0ad53281f236424a72ae021f293a3a5ca69217 and http://cgit.freedesktop.org/mesa/mesa/commit/?id=e32b601e7d79e8fa67b3e9f636125eebc01f3884
http://cgit.freedesktop.org/mesa/mesa/commit/?id=45f4e8842e3dae9d8be2a38769a57a524fdc335f
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/54.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.