gtimer segfaults at startup (precise)
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_
2055 g_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.
Related branches
Changed in gtimer (Debian): | |
status: | Unknown → New |
Changed in gtimer (Debian): | |
status: | New → Fix Released |
description: | updated |
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.]