Eo: Prevent shutdown from actually doing anything
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Dec 2015 11:29:36 +0000 (20:29 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 29 Dec 2015 11:55:50 +0000 (20:55 +0900)
commite47edc250dc715a6b0f94be4b1cb81d32e9d97fe
tree4e25188455c0197d068894269bfe4d6126320a6e
parent0dd9e02df24435a13a505232be0db5a5eb07d1f4
Eo: Prevent shutdown from actually doing anything

Currently, eo_shutdown can't work.

Every Eo_Class ID is stored inside its class_get() function as a
static variable. This means any call to class_get() after eo_shutdown()
(even if eo_init was done properly) will lead to using an invalid ref
for the class id. In other words, the class is not valid anymore,
and objects can't be created.

Resetting the pointer to NULL would be possible, if we passed it
during the class creation. But this would lead to potential crashes
if a class was created from a now dlclosed library.

The only solution I can envision here is to check that class_get
actually returns a valid ref with the right class name. Most likely
the performance impact is not acceptable.

This fixes make check for me (with systemd module for ecore).
src/lib/eo/eo.c