Summary: | telepathy-gabble crashed with signal 5 in g_return_if_fail_warning() | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Pedro Villavicencio <pvillavi> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | critical | ||
Priority: | medium | Keywords: | patch |
Version: | 0.13 | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/wjt/telepathy-glib.git/log/?h=40523-crash-on-ack | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Pedro Villavicencio
2011-08-31 11:14:15 UTC
I have a test case for this now; it's a crash in telepathy-glib caused by an application passing the same ID more than once in a call to AcknowledgePendingMessages... Here's a fix, which could do with being reviewed. (I do wonder which client is being foolish and acking the same message more than once in a single call!) I don't understand how the first commit helps, but it's fine. I would just add a DEBUG() in the case it found a dup, to help debug the faulty client later. (In reply to comment #3) > I don't understand how the first commit helps, but it's fine. It's so we don't have to skip over “holes” in the array. If AcknowledgePendingMessages([1, 2, 1, 3]) is called, previously 'nodes' would end up looking like this: [ GList { data = 0x1111 } , GList { data = 0x2222 } , GList { data = 0x1111 } , GList { data = 0x3333 } ] The crash occurred when we tried to free 0x1111 a second time. If I had just changed the loop to skip duplicates, it would have looked like this: [ GList { data = 0x1111 } , GList { data = 0x2222 } , uninitialized memory , GList { data = 0x3333 } ] Obviously we could use g_new0, but we'd still have to check for, and skip, the NULLed-out gap in the array. By switching to a dynamically-sized array, there are no gaps to skip. > I would just add a DEBUG() in the case it found a dup, to help debug the faulty > client later. Added a patch to do this. Fixed in 0.14.10 and 0.15.7. (In reply to comment #5) > Fixed in 0.14.10 and 0.15.7. I should be clear that these are versions of telepathy-glib. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.