This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch evas-buffer-damage-after-norender
in repository efl.

View the commit online.

commit fa8054275463d0f8392b8862f90773f7a29c07bf
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Dec 2 15:24:09 2026 -0600

    ecore_evas: keep the engine module table across init and shutdown
    
    ecore_evas_init() built a new hash of the loaded engine modules each
    time the library started from zero, and ecore_evas_shutdown()
    deliberately never frees it, nor the modules in it. A program that
    shuts ecore_evas down and starts it again lost the previous hash, and
    a new handle was opened on every engine module it used, one leaked per
    engine per init and shutdown cycle.
    
    Create the hash once. The modules are never unloaded anyway, so a later
    init can use what is registered already. _ecore_evas_vnc already
    survives across cycles the same way.
    
    Seen by valgrind on a program doing four ecore_evas_init() and
    ecore_evas_shutdown() rounds, run on this tree with EFL_RUN_IN_TREE=1:
    
      before: definitely lost 192 bytes in 3 blocks
      after:  definitely lost   0 bytes in 0 blocks
    
    No test: the check framework cannot see a lost hash, only valgrind can.
    
    Co-Authored-By: Claude Fable 5.2 <[email protected]>
---
 src/lib/ecore_evas/ecore_evas_module.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 43c2f4a267..5062a99b76 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -148,7 +148,8 @@ _ecore_evas_engine_init(void)
 
 /* avoid freeing modules ever to avoid deferred cb symbol problems */
 //   _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
-   _registered_engines = eina_hash_string_small_new(NULL);
+   if (!_registered_engines)
+     _registered_engines = eina_hash_string_small_new(NULL);
 
    /* 1. libecore_evas.so/../ecore_evas/engines/ */
    paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to