Commit Graph

16 Commits

Author SHA1 Message Date
Tom Hacohen 0b86334a85 Eo id: Fix id security checks for invalid objects.
In some cases, invalid object ids (e.g 0x1) would pass validation and
represent completely different objects (0x80...01). This happened because
we weren't properly checking a given object id is actually an object id.

@fix.
2014-10-22 11:31:10 +01:00
Cedric BAIL 68384fc7ef eo: let's be consistent and use the portable flag MAP_ANON. 2014-09-03 17:14:39 +02:00
Daniel Kolesa 78acf69e20 eo, autotools: check for mmap feature rather than OS (mmap is POSIX) 2014-08-21 11:54:17 +01:00
Jean Guyomarc'h dc8e006e4f eo: mmap()/unmap() are also supported on OSX
Reviewers: raster, raoulh
@feature

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1240

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-08-21 12:04:53 +02:00
Tom Hacohen 61f3f68670 Eo: Make it clearer that a NULL deref can't happen.
We check _current_table for NULL, and then populate it (it's a global)
through another function, but we don't really check it's not NULL before
using it, we just assume because of an indirect other variable.

This confused coveritiy, can confuse humans too, and in general risky
(if something changes).

CID 1039419
2014-05-16 14:43:09 +01:00
Carsten Haitzler f81f1d6172 eo - let's make NULL objects simply debug warnings, not errors.
due to recent changes a lot of objects are now NULL (correctly) and eo
complains on access of them. it's simply too noisy adding too many
if's all through code, so let's just make eo be sensible here.
2014-04-16 12:31:44 +09:00
Tom Hacohen 122a2f890e Eo: Made eo id for classes a bit more secure.
This patch sets the one before most significant bit on for classes. This
means that class ids are now very big, compared to the old ids which
were growing small integers (1, 2, 3...).
This makes accidental passing of integers (corrupted obj pointers) less
common.

@feature
2014-03-11 15:56:30 +00:00
Tom Hacohen 1059f802bf Eo: Rename Eo_Header to Eo_Base. 2013-09-27 14:01:47 +01:00
Tom Hacohen e17e66db8c Eo: Get rid of handle. Use the shared header for detection. 2013-09-27 14:01:47 +01:00
Tom Hacohen 5e90d51013 Eo: Merge common part of class and object.
First step toward getting rid of "handle".
2013-09-27 14:01:47 +01:00
Jérémy Zurcher 41bd91379e eo: _Eo -> _Eo_Object
Conflicts:
	src/lib/eo/eo.c
2013-09-27 14:01:46 +01:00
Jérémy Zurcher a246e581a6 eo: if HAVE_EO_ID use MBS to tag Eo_Id
a bit is taken from generation bits to tag objects references so that we
know if a Eo* is a class or an object
2013-09-27 14:01:46 +01:00
Jérémy Zurcher 5913f78b4f eo: if !HAVE_EO_ID front-pad _Eo_Class and _Eo_Object with _Eo_Handle
this is the first step on the road to remove class specific EAPI from Eo.h
using this handle we will know if a Eo* is a class or an object pointer

Conflicts:
	src/lib/eo/eo.c
2013-09-27 14:01:46 +01:00
Jérémy Zurcher 027548011c eo_ptr_indirection.x: fix _eo_id_release when !HAVE_EO_ID 2013-09-18 17:12:15 +02:00
Tom Hacohen 77cf31d322 Eo: Set (again, got removed) deleted eo objects' magic.
The French tried to sneak a bug in, they failed.
Bug was introduced in 337fac0e73.
2013-09-10 15:57:34 +01:00
Cedric Bail c435968f69 eo: a little more inlining, give me a 10% speed improvement. 2013-07-01 18:18:40 +09:00