raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=758e7d35629e01589a23cef085d940dd7bfee5d5

commit 758e7d35629e01589a23cef085d940dd7bfee5d5
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Jul 23 19:09:11 2017 +0900

    eina debug - don't try and collect stats on more than a million threads
    
    sanity check... just in case.
---
 src/lib/eina/eina_debug_bt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c
index e3e56badaf..c9bf23c541 100644
--- a/src/lib/eina/eina_debug_bt.c
+++ b/src/lib/eina/eina_debug_bt.c
@@ -232,6 +232,8 @@ _trace_cb(void *data EINA_UNUSED)
 
    // take a lock on grabbing thread debug info like backtraces
    eina_spinlock_take(&_eina_debug_thread_lock);
+   // too many threads (over 1 million) !!!!
+   if (_eina_debug_thread_active_num > (1024 * 1024)) goto err;
    // reset our "stack" of memory se use to dump thread info into
    _eina_debug_chunk_tmp_reset();
    // get an array of pointers for the backtrace array for main + th

-- 


Reply via email to