Giter Club home page Giter Club logo

Comments (5)

madebr avatar madebr commented on September 13, 2024

The leaks are:

Memory allocations:
21: Allocation 0: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 1: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 2: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 3: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 4: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 5: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 6: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 7: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 8: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 9: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 10: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Allocation 11: 400 bytes
21: 	0x7eff9a74b146: SDL_calloc_REAL+0x16
21: 	0x7eff9a71c3ff: GPU_CreateRenderer+0x3f
21: 	0x7eff9a70f905: SDL_CreateRendererWithProperties_REAL+0x495
21: 	0x7eff9a70fabf: SDL_CreateRenderer_REAL+0x3f
21: 	0x55f7ad7ca40f: InitCreateRenderer+0x6f
21: 	0x55f7ad7e7919: SDLTest_RunSuites+0x739
21: 	0x55f7ad7afa04: main+0x314
21: 	0x7eff9a483083: __libc_start_main+0xf3
21: 	0x55f7ad7afb5e: _start+0x2e
21: Total: 4.69 Kb in 12 allocations

from sdl.

Akaricchi avatar Akaricchi commented on September 13, 2024

These leaks were introduced in 40d8510

GPU_DestroyRenderer() was supposed to take care of freeing all the sub-allocations, but for some reason the call was removed.

from sdl.

Akaricchi avatar Akaricchi commented on September 13, 2024

The higher level code will clean up the renderer if initialization fails.

This isn't happening because some failure conditions are checked before renderer->DestroyRenderer is initialized.

from sdl.

slouken avatar slouken commented on September 13, 2024

The higher level code will clean up the renderer if initialization fails.

This isn't happening because some failure conditions are checked before renderer->DestroyRenderer is initialized.

Ah, yes, the renderer needs to be updated to match the pattern of the others. I can do that.

from sdl.

madebr avatar madebr commented on September 13, 2024

Fixed in #10643 and bef0702

from sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.