gtimer segfaults at startup (precise)

Bug #974038 reported by Juha Aatrokoski
58
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gtimer (Debian)
Fix Released
Unknown
gtimer (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

Impact: gtimer sometimes fails to start and crashes with a segfault

Fix: the code does not initialize a variable it later uses causing memory corruption

TEST CASE:

start gtimer

a window should show

sometimes it doesn't crash, running it in valgrind will show an conditional jump on uninitialized memory

Regression Potential:

just setting a variable to NULL, no regressions should be possible.

original report:

gtimer segfaults at startup when run on precise beta, with the following info from gdb:

Program received signal SIGSEGV, Segmentation fault.

create_main_window_menu_bar () at main.c:2055

2055 g_message(gettext("Building menu Failed: %s \n"), err->message);

My guess is that newer GTK+ does not touch the uninitialized pointer 'err' unless an error actually occurs (whether this is a bug in GTK+ or by design I don't know). I've attached a patch to fix this, at least gtimer starts OK with it applied (I don't use it myself so it's hard to say more). However, similar bugs caused by uninitialized pointers may lurk elsewhere in the code.

Revision history for this message
Juha Aatrokoski (jha-kurp) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch to fix startup segfault" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtimer (Ubuntu):
status: New → Confirmed
Changed in gtimer (Debian):
status: Unknown → New
Changed in gtimer (Debian):
status: New → Fix Released
Revision history for this message
Julian Taylor (jtaylor) wrote :

this should be fixed in quantal:

gtimer (2.0.0-1.1) unstable; urgency=low

  * Non-maintainer upload.
  * Fix segfault due to uninitialized variable. closes: #668663.

Changed in gtimer (Ubuntu):
status: Confirmed → Fix Released
Julian Taylor (jtaylor)
description: updated
Revision history for this message
Julian Taylor (jtaylor) wrote :

I have uploaded the same fix to precise, please test it when the upload is accepted.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Juha, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gtimer (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Juha Aatrokoski (jha-kurp) wrote :

The package from precise-proposed works OK (very simple fix so no surprise there).

description: updated
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtimer - 2.0.0-1ubuntu0.1

---------------
gtimer (2.0.0-1ubuntu0.1) precise-proposed; urgency=low

  * Fix segfault due to uninitialized variable. (LP: #974038)
 -- Julian Taylor <email address hidden> Sat, 30 Jun 2012 21:00:44 +0200

Changed in gtimer (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.