GNOME Bugzilla – Bug 523402
Crash on paste event in calendar
Last modified: 2008-09-02 08:52:59 UTC
I tried cut&paste the even form one day to other and it crashed with double free with this trace: Program received signal SIGABRT, Aborted. (gdb) bt
+ Trace 192869
Created attachment 107636 [details] [review] proposed evo patch for evolution; Seems like icaltimezone_get_tzid returns its own local value, thus do not free it. Is it related to Chen's recent changes in libical memory management?
I don think its related to the libical changes. Timezones piece of code in libical was never touched. This has been a regression due to https://bugzilla.gnome.org/attachment.cgi?id=95339&action=view which both of us has missed :( The patch looks good to commit.
commit to stable and trunk.
Committed to trunk. Committed revision 35376. Committed to gnome-2-22. Committed revision 35377.
(In reply to comment #2) > I don think its related to the libical changes. Timezones piece of code in > libical was never touched. This has been a regression due to > https://bugzilla.gnome.org/attachment.cgi?id=95339&action=view which both of us > has missed :( I just wonder whether we should not revert (or better improve) that patch, because it's possible it will crash even on other places, what do you think?
You need not revert the patch. Just set the tzid to NULL in other places as well if the memory for tzid is a const before calling e_cal_component_free_datetime or the tzid should be duped. The ECalComponentDateTime should be free'ed anyways. I see in some places the tzid is set to NULL before free'ing. So it would be good to fix up the areas which are bad.
Created attachment 109477 [details] [review] proposed evo patch (additional) for evolution; Believe or not, but it seems like all other places are fine. As far as I read the code. Unfortunately I found two little weak places, so here's a patch.
Created attachment 109478 [details] [review] proposed evo patch (additional) for evolution; (err, compiler warnings)
*** Bug 513550 has been marked as a duplicate of this bug. ***
*** Bug 530655 has been marked as a duplicate of this bug. ***
The patch at comment #8 looks good to commit. W.r.t patch mentioned at comment #2, the tzid must be reset to NULL in some more places at e-day-view.c. Am listing the bit of code here, + e_cal_component_get_dtstart (comp, &ecdt); + is_date = ecdt.value && ecdt.value->is_date; if (!is_date) date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view))); dt = day_view->day_starts[day_view->resize_start_row]; *date.value = icaltime_from_timet_with_zone (dt, is_date, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view))); e_cal_component_set_dtstart (comp, &date); + e_cal_component_free_datetime (&ecdt);
*** Bug 531919 has been marked as a duplicate of this bug. ***
*** Bug 532182 has been marked as a duplicate of this bug. ***
I can confirm this bug. see bug 531919
*** Bug 528362 has been marked as a duplicate of this bug. ***
Patch committed to stable (gnome-2-22) branch as r35532 http://svn.gnome.org/viewvc/evolution?view=revision&revision=35532 Patch committed to SVN trunk as r35533 http://svn.gnome.org/viewvc/evolution?view=revision&revision=35533
Because also the second patch has been committed, then I'm setting this as fixed.
*** Bug 531022 has been marked as a duplicate of this bug. ***