Page MenuHomePhabricator

eina_debug: make shutdown perform cleanups and kill the timer thread
ClosedPublic

Authored by zmike on Jun 15 2018, 1:59 PM.

Details

Summary

this should not remain active after eina has been deactivated, so ensure
that everything stops as expected

ref T7019
Depends on D6305

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.Jun 15 2018, 1:59 PM
zmike requested review of this revision.Jun 15 2018, 1:59 PM
escwyp added a subscriber: escwyp.Jun 17 2018, 2:55 AM
escwyp added inline comments.
src/lib/eina/eina_debug.c
210–211

Maybe keep the check if session is NULL:

if (!session) goto end;

I had the case where my program crashed in eina_debug because session was NULL and it wasn't handled.

zmike added inline comments.Jun 18 2018, 3:35 AM
src/lib/eina/eina_debug.c
210–211

I'd be interesting in seeing a trace for this in the current code.

After these changes, however, it's no longer possible for this function to be called while session is NULL; the block at L586 has been reworked and the thread will now exit immediately once the session is freed, and that is the only place where session is deallocated.

zmike added inline comments.Jun 18 2018, 8:01 AM
src/lib/eina/eina_debug.c
210–211

Oh I see, I'll add a test for this case...

ManMower accepted this revision.Jun 19 2018, 10:25 AM
This revision is now accepted and ready to land.Jun 19 2018, 10:25 AM
This revision was automatically updated to reflect the committed changes.