edje signal matches - try number 3 to try plug all the holes
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 22 Aug 2019 23:20:44 +0000 (00:20 +0100)
committerHosang Kim <hosang12.kim@samsung.com>
Wed, 28 Aug 2019 04:30:52 +0000 (13:30 +0900)
commit9adc62d76ddefe05b4404ababd1c55dd4548547a
tree4abb279e2d0b1fb464d02b49902acd7cc9e0aee9
parent78c34f1db28c0e18af024753ec7cec92d0fde1dc
edje signal matches - try number 3 to try plug all the holes

i found some more cases where the hash may change, so del and add from
the hash when this happens...

and... i found a nasty. _edje_signal_match_key_cmp compared pointers
like:

int return = ptr_a - ptr_b;

what happens if .... ptr_a and ptr_b are more than 2^31 (2gb) apart?
overflow (or underflow) and we return the wrong thing. i suspect this
is part of the problem and why my has remove/adds have not been
working because ... i suspect that maybe the hash dels have not been
finding things. i can't be sure right now, but it is an obvious
problem that i fixed by just doing if's and returning -1 or 1. also i
found a double-add or overwrite int he hash - when we shuffled with
_edje_signal_callback_move_last the matches CAN match exactly
something already in the hash thus adding it in will conflict with
what is already there as keys match. handle this cvase now and i have
seen segv's go away for now.

@fix
src/lib/edje/edje_private.h
src/lib/edje/edje_program.c
src/lib/edje/edje_signal.c