After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 453644 - All Mean-Tests Broken
All Mean-Tests Broken
Status: RESOLVED DUPLICATE of bug 450676
Product: Gnumeric
Classification: Applications
Component: Analytics
1.7.x
Other Linux
: Normal major
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-07-04 10:40 UTC by Almer S. Tigelaar
Modified: 2007-07-04 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the duplicate state release in the analysis tools. (564 bytes, patch)
2007-07-04 10:41 UTC, Almer S. Tigelaar
none Details | Review

Description Almer S. Tigelaar 2007-07-04 10:40:05 UTC
While using Gnumeric 1.7.8 I noticed that when using any of the mean-tests (those functions under Tools->Statistical Tests->Two Means) Gnumeric would crash hard (with a segmentation fault).

I am using Gnumeric for some statistical analysis on a university project, so I needed this to work. Hence, I downloaded the source and debugged (source looks quite tidy by the way, good work Jody, et al. :)).

Anyway, the problem was somewhat tricky to find, but the fix is straightforward. The following is regarding src/dialogs/dialog-analysis-tools.c:
===============================================================
The call to g_object_set_data_full() around line 395 sets the state as object
data and sets a destroy handler as well to release the state again automagically.

The call to g_object_set_data() around line 1484 sets THE SAME state again as
object data which subsequently results in releasing it (trough the destroy handler)
which invalidates the memory pointed to.
===============================================================

I imagine that there are systems in which this problem does not actually lead to a crash (due to the fact that the memory is not overwritten after release). Nevertheless, on my system it crashed consistently because of this.

This bug exists at least from Gnumeric 1.7.8 upwards to 1.7.10. It destabilizes all usage of the two means analysis tools, hence I would regard this as a major, but not a critical issue.

I will attach a patch with a fix for this.
Comment 1 Almer S. Tigelaar 2007-07-04 10:41:39 UTC
Created attachment 91172 [details] [review]
Fixes the duplicate state release in the analysis tools.

Proposed patch. This quite straightforwardly removes the duplicate release of the state data.
Comment 2 Jody Goldberg 2007-07-04 11:34:15 UTC
Thanks the patch is already in trunk.

*** This bug has been marked as a duplicate of 450676 ***