Ok, then I think the better fix would be to revert the change and do a
memset(&fdata, 0, sizeof(Edje_List_Foreach_Data)); This avoids an
unnecessary malloc/free and should do the same thing.

On 3/1/07, Christopher Michael <[EMAIL PROTECTED]> wrote:
> Nathan Ingersoll wrote:
> > Could you elaborate why this change was made? It's just replacing a
> > temporary allocation on the stack with a temporary allocaiton on the
> > heap. The structure contents will still be allocated internally. I
> > could see a memset being necessary if the foreach function uses the
> > contents of fdata uninitialized.
> >
> Which I believe is exactly what the case was. Here is the backtrace from
> the segfault.
>
> dh
>
> #0  evas_list_append (list=0xb7f76e09, data=0x8374bf8) at evas_list.c:91
> #1  0xb7f79003 in _edje_color_class_list_foreach (hash=0x81c41a8,
>     key=0x8290864 "module_label", data=0x82992d0, fdata=0xbfef0480)
>     at edje_util.c:280
> #2  0xb7d540b3 in evas_hash_foreach (hash=0x81c41a8,
>     func=0xb7f78fd0 <_edje_color_class_list_foreach>, fdata=0xbfef0480)
>     at evas_hash.c:448
> #3  0xb7f76e31 in edje_color_class_list () at edje_util.c:269
> #4  0x0807271e in _e_ipc_cb_client_data (data=0x0, type=73, event=0x84d0718)
>     at e_ipc_handlers.h:7438
> #5  0xb7ee6b06 in _ecore_event_call () at ecore_events.c:428
> #6  0xb7eed57e in _ecore_main_loop_iterate_internal (once_only=0)
>     at ecore_main.c:639
> #7  0xb7eed767 in ecore_main_loop_begin () at ecore_main.c:79
> #8  0x08068448 in main (argc=1, argv=0xbfef4054) at e_main.c:839
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to