HomePhabricator

edje signal matches - try number 3 to try plug all the holes

Authored by raster on Aug 22 2019, 4:20 PM.

Description

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

Details

Committed
rasterAug 23 2019, 11:36 AM
Parents
rEFLa7273fc8647e: edje signal - let's not crash if something odd happens
Branches
Unknown
Tags
Unknown