int/Integer argument type mismatch inside peigs is causing segmentation fault


Click here for full thread
Clicked A Few Times
Quote:Edoapra Jan 21st 11:50 am
Is this the change you are suggesting?

--- pdspev_c.c	(revision 27970)
+++ pdspev_c.c	(working copy)
@@ -395,7 +395,7 @@
    */
 
    proclist = iscratch;
-   reduce_maps( *n, mapA, *n, mapZ, 0, mapZ, &nn_proc, proclist );
+   reduce_maps( *n, mapA, *n, mapZ, (Integer) 0, mapZ, &nn_proc, proclist );
 
    i_scrat = iscratch + nn_proc;
 


That's a correct but fragile fix. It leaves the other dozen instances of calls to the exact same function broken, and requires manually keeping the call site cast in sync with the argument type.

I much prefer the fix of adding a full prototype to a header file which is already included in all of these files. Which I said in the very first post.

I have taken the time to study code in your software written in a three decade old style, isolate and fix a bug that causes UNDEFINED BEHAVIOR (which calls into question the validity of all publications using it), explain it, and your first response is to deny that there is a bug, and then after I carefully show that both the formal and practical rules are being broken, you still can't be bothered to read my explanation??!?

I have done all the work that the rest of the open source world wishes that people reporting bugs would do. What more do you want?