Commit Graph

1238 Commits

Author SHA1 Message Date
Vincent Torri d3420a210d put again eina tests in the source tree
SVN revision: 56193
2011-01-16 17:55:41 +00:00
Carsten Haitzler ef9a0591f1 why calloc (fill with 0's) then re-fill it again instantly.. except
the nul terminator? pointless. fix.



SVN revision: 56145
2011-01-16 01:14:29 +00:00
Mike Blumenkrantz 1147f3a5ca fix null deref again, this time with the power of spankies
SVN revision: 56105
2011-01-14 08:04:23 +00:00
Mike Blumenkrantz 2ea38f3b4a we null check right before this. seriously.
SVN revision: 56090
2011-01-14 03:29:58 +00:00
Mike Blumenkrantz 97585ca507 if alloca fails you're screwed anyway, so not much point checking for it
SVN revision: 56089
2011-01-14 03:28:27 +00:00
Mike Blumenkrantz 01f1362c4e and also avoid leak while avoiding
SVN revision: 56088
2011-01-14 03:21:50 +00:00
Mike Blumenkrantz 3685b112ee avoid possible null function pointer
SVN revision: 56087
2011-01-14 03:19:17 +00:00
Carsten Haitzler 6502ea96ea hve to revert these commits. they hve created a whole chunk of 64bit
crashes on linux. this is REALLY bad. so remove these changes now.



SVN revision: 55981
2011-01-07 15:56:54 +00:00
Vincent Torri 0745ad7878 use configure-time headers checks instead of compiler ones
SVN revision: 55967
2011-01-07 06:28:17 +00:00
Vincent Torri f2474ddf7c revert non wanted changes
SVN revision: 55939
2011-01-06 18:26:40 +00:00
Vincent Torri 5a36e40473 move AC_GNU_SOURCE before libtool init
SVN revision: 55938
2011-01-06 18:19:42 +00:00
Vincent Torri 2b2aef3744 add guards in config.h to avoid multiple inclusions
SVN revision: 55937
2011-01-06 18:13:54 +00:00
Vincent Torri c8c4f6bf9f make eina compile again on Windows CE
SVN revision: 55853
2011-01-04 18:09:22 +00:00
Vincent Torri 4f74d075c6 better namespace
SVN revision: 55813
2011-01-03 07:16:01 +00:00
Tom Hacohen c730fdf95e Fixed documentation a bit.
SVN revision: 55778
2010-12-30 07:51:26 +00:00
Mike Blumenkrantz ab8ceec8eb Hey,
below is a patch to delete mempools in eina_quadtree_shutdown() (i 
currently can not commit).

Vincent


SVN revision: 55767
2010-12-28 13:22:12 +00:00
Carsten Haitzler 26158c9510 remove eina tests
SVN revision: 55637
2010-12-19 03:05:58 +00:00
Vincent Torri 6c81b349a4 remove warning
SVN revision: 55578
2010-12-16 07:45:12 +00:00
Carsten Haitzler c751d12c8b no long casts - just case to/from void * as needed. i dont see why we
needed any uintptr_t or long there.



SVN revision: 55569
2010-12-16 04:28:03 +00:00
Cedric BAIL 701cfebbed * eina: some time compiler are really stupid...
SVN revision: 55561
2010-12-15 11:56:50 +00:00
Cedric BAIL 72c9afd3cb * eina: fix typo.
SVN revision: 55560
2010-12-15 11:14:47 +00:00
Cedric BAIL e6b5488d1d * eina: also update ldflags instead of cflags.
SVN revision: 55555
2010-12-14 16:20:48 +00:00
Vincent Torri d8f05983b7 add eina_sched.c to the vcproj file
SVN revision: 55524
2010-12-12 22:42:20 +00:00
Vincent Torri 2ce2e79087 update vcproj file
SVN revision: 55495
2010-12-11 13:13:10 +00:00
Vincent Torri 063cfb735b don't redefine macro when using Visual Studio
SVN revision: 55494
2010-12-11 13:11:59 +00:00
Vincent Torri 7d368bd7a0 missing cast
SVN revision: 55487
2010-12-11 07:09:07 +00:00
Vincent Torri bd8506e727 warning--
SVN revision: 55486
2010-12-11 07:02:25 +00:00
Carsten Haitzler c6471b1e14 formatting fixups.
SVN revision: 55485
2010-12-11 04:05:52 +00:00
Carsten Haitzler 37a7c5bce9 fix void ptr math. odd that no warnings happened before with all my
warning flags on.



SVN revision: 55484
2010-12-11 03:57:05 +00:00
Carsten Haitzler 71def62b47 revert part of commit - broke compilation. no uintptr_t in linux
yeaders by default - likely breaks even more.



SVN revision: 55483
2010-12-11 03:44:33 +00:00
Vincent Torri e84f5357ff * make vc++ happy with ERR()
* use uintptr_t where needed.

Please someone check if the compilation is still good on linux (I'm on
Windows), to see if a header must be included for uintptr_t or not.

SVN revision: 55479
2010-12-11 00:45:26 +00:00
Vincent Torri f39a7b7fcd update Visual Studio files
SVN revision: 55478
2010-12-11 00:42:29 +00:00
Vincent Torri 84b6c26d99 warning--
SVN revision: 55477
2010-12-11 00:41:31 +00:00
Vincent Torri 0d2cd096b4 warning--
SVN revision: 55476
2010-12-11 00:40:52 +00:00
Vincent Torri d1e8eafa53 warning--
SVN revision: 55475
2010-12-11 00:40:05 +00:00
Vincent Torri 560d9a3ab0 put EINA_MAGIC at the end of the structure
SVN revision: 55474
2010-12-11 00:39:28 +00:00
Sebastian Dransfeld 35c165d2e4 Fix me as author
SVN revision: 55438
2010-12-10 06:05:35 +00:00
Gustavo Sverzut Barbieri ef5c356153 Use EINA_PATH_MAX where it makes sense.
All the access to Eina_File_Direct_Info::path should be using the
actual size (EINA_PATH_MAX) and not another constant (PATH_MAX).



SVN revision: 55403
2010-12-09 10:14:11 +00:00
Carsten Haitzler 9317a439fb and if i'm breaking shit... i may as well put it at the end, so if
size changes later to be bigger, existing code doesnt break (due to
the way this is meant to be accessed).



SVN revision: 55388
2010-12-09 02:55:08 +00:00
Carsten Haitzler 2382fe75ce ok - make it 8192.
SVN revision: 55387
2010-12-09 02:46:11 +00:00
Carsten Haitzler 8ed17348e9 spottied a stabilty/portability bug with PATH_MAx inside a public
header. fix. see comments.



SVN revision: 55386
2010-12-09 01:29:52 +00:00
Cedric BAIL 3e5887714b * eina: forgotten link.
SVN revision: 55380
2010-12-08 19:32:23 +00:00
Marco Trevisan (Treviño) bbc439bdb7 SVN revision: 3
Subject: [E-devel] [PATCH] eina share common check for node type

Hello, recentely I've been experiencing a lot of segfaults when running
an Elementary application which uses a genlist with some swallowed parts
in which I put some elm icons (png files).
When running it I often get crashes... Debugging it I found this:

=========
CRI<14207>: eina_share_common.c:561 _eina_share_common_node_from_str()
*** Eina Magic Check Failed !!!
    Input handle is wrong type
        Expected: 98761254 - Eina Stringshare Node
            Supplied: 6e657070 - (unknown)
            *** NAUGHTY PROGRAMMER!!!
            *** SPANK SPANK SPANK!!!
            *** Now go fix your code. Tut tut tut!
            
            
            //DEBUG: Node referencies 622869060 (slen: 1145307236)
            
            
            Program received signal SIGSEGV, Segmentation fault.
            eina_share_common_del (share=0x65c810, str=0x7ffff1219150
"5hhu %5hu '%
s'\n")
    at eina_share_common.c:858
    858        node->references--;
    =========
    
    So it seems that edje tries to delete an invalid eina_share_common
    string (is this a bug that should be fixed or is it
theme-dependent?),
and so the "node" pointer in eina share is not valid...

However eina never checks for its validity, so it seg-faults...
The attached patch fix this issue, setting the node to null when its
magic is not valid, and then always checking for its validity.

Is this fine?


Full stack trace:

#0  eina_share_common_del (share=0x65c810, str=0x7ffff1219150 "5hhu %5hu
'%s'\n")
    at eina_share_common.c:858
    #1  0x00007ffff120e047 in eina_stringshare_del (str=0x7ffff1219150
"5hhu
%5hu '%s'\n")
    at eina_stringshare.c:632
    #2  0x00007ffff1e1f7bc in _edje_text_recalc_apply (ed=0x95b900,
    ep=0x70c3a0, 
        params=0x70c500, chosen_desc=<value optimized out>) at
        edje_text.c:556
        #3  0x00007ffff1de402d in _edje_part_recalc (ed=0x95b900,
ep=0x70c3a0,
flags=3)
    at edje_calc.c:2007
    #4  0x00007ffff1de4d86 in _edje_recalc_do (ed=0x95b900) at
    edje_calc.c:268
    #5  0x00007ffff1e25c7d in edje_object_part_swallow (obj=<value
optimized
out>, 
    part=0x7fffe001484c "elm.swallow.icon", obj_swallow=0x7fffe0017860)
        at edje_util.c:2300
        #6  0x00007ffff1b5d5fc in _item_realize (it=0x7fffe0016ed0,
in=10,
calc=1)
    at elm_genlist.c:1489
    #7  0x00007ffff1b5db89 in _item_block_recalc (itb=0x95b6a0,
in=<value
optimized out>, 
    qadd=<value optimized out>, norender=<value optimized out>) at
    elm_genlist.c:1609
    #8  0x00007ffff1b5e329 in _queue_proecess (wd=0x721b70,
norender=<value
optimized out>)
    at elm_genlist.c:2425
    #9  0x00007ffff1b5e567 in _item_queue (wd=0x721b70, it=<value
optimized
out>)
    at elm_genlist.c:2476
    #10 0x00007ffff1b5ead9 in elm_genlist_item_append (obj=<value
optimized
out>, 
    itc=0x7ffff2977040, data=0x8fed90, parent=0x0,
    flags=ELM_GENLIST_ITEM_NONE, 
        func=<value optimized out>, func_data=0x0) at elm_genlist.c:2528
        
        [eina-share-common-del-check-for-node.patch  text/x-patch
(1.2KB)]
Index: src/lib/eina_share_common.c
===================================================================
--- src/lib/eina_share_common.c(revisione 55018)
+++ src/lib/eina_share_common.c(copia locale)
@@ -558,7 +558,7 @@
    const size_t offset = offsetof(Eina_Share_Common_Node, str);
     
         node = (Eina_Share_Common_Node *)(str - offset);
         -   EINA_MAGIC_CHECK_SHARE_COMMON_NODE(node, node_magic, );
         +   EINA_MAGIC_CHECK_SHARE_COMMON_NODE(node, node_magic, node
= NULL);
    return node;
     
         (void) node_magic; /* When magic are disable, node_magic is
unused, this remove a warning. */
@@ -821,6 +821,7 @@
 
     SHARE_COMMON_LOCK_BIG();
         node = _eina_share_common_node_from_str(str,
share->node_magic);
+   if (!node) return str;
    node->references++;
        DBG("str=%p refs=%u", str, node->references);
         
         @@ -847,6 +848,9 @@
             SHARE_COMMON_LOCK_BIG();
              
                  node = _eina_share_common_node_from_str(str,
share->node_magic);
+   if (!node)
+      return;
+
    slen = node->length;
        eina_share_common_population_del(share, slen);
            if (node->references > 1)
            @@ -901,6 +905,7 @@
                   return -1;
                    
                        node = _eina_share_common_node_from_str(str,
share->node_magic);
+   if (!node) return 0;
    return node->length;
     }
      


SVN revision: 55265
2010-12-05 03:14:03 +00:00
Cedric BAIL 602241b004 * eina,eet,embryo,evas,ecore,edje,efreet,e_dbus,eeze: beta3 !
SVN revision: 55238
2010-12-04 00:50:58 +00:00
Cedric BAIL 6f973acf31 * eina: forgotten file.
SVN revision: 55237
2010-12-04 00:46:01 +00:00
Cedric BAIL c7f47e4660 * eina: define PATH_MAX when needed.
SVN revision: 55232
2010-12-03 23:04:26 +00:00
Cedric BAIL e031740d22 * eina: don't fail if we didn't enable thread support completly.
SVN revision: 55226
2010-12-03 21:50:50 +00:00
Cedric BAIL bf3d026f41 * eina: fix typos.
SVN revision: 55223
2010-12-03 18:46:49 +00:00
Cedric BAIL bf066c2390 * eina: fix typo.
SVN revision: 55212
2010-12-03 18:12:19 +00:00
Cedric BAIL 7ad0ae92b5 * eina: add forgotten header.
SVN revision: 55211
2010-12-03 18:02:51 +00:00