[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#764510: gcc-4.9: gnucash segfaults when built with GCC 4.9



reassign -1 gnucash
found -1
found -1 1:2.6.4-1
tags -1 + patch
thanks


Maybe next time, I'll spend five minutes looking at the code instead of
an evening messing around with gcc.  (It was very formative, though.
Thanks for your help.  And sorry for wasting your time.)

Reassigning this stack overflow bug to gnucash.  (I still have the
*.[is] files, but I doubt they are of any interest to you now.)


Poring over the code history, this appears to have been present at least
since 2007; some random change in gcc just allowed it to emerge.  (It
basically hinges on whether or not the four bytes following var_args on
the stack look like a negative int.  On i386, at least.)

diff --git a/src/gnome/dialog-sx-since-last-run.c b/src/gnome/dialog-sx-since-last-run.c
index a230723..ebf6387 100644
--- a/src/gnome/dialog-sx-since-last-run.c
+++ b/src/gnome/dialog-sx-since-last-run.c
@@ -537,8 +537,8 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model)
                                            SLR_MODEL_COL_VARAIBLE_VALUE, tmp_str->str,
                                            SLR_MODEL_COL_INSTANCE_VISIBILITY, FALSE,
                                            SLR_MODEL_COL_VARIABLE_VISIBILITY, TRUE,
-                                           SLR_MODEL_COL_INSTANCE_STATE_SENSITIVITY, FALSE
-                                           - 1);
+                                           SLR_MODEL_COL_INSTANCE_STATE_SENSITIVITY, FALSE,
+                                           -1);
                         g_string_free(tmp_str, TRUE);
                     }
                     g_list_free(vars);

Reply to: