Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong argument to cs_transpose leads to segfault #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radarsat1
Copy link
Contributor

Quite some time ago I fixed a bug in the Debian package of a segfault randomly happening during testing. At the time I determined that the argument to cs_transpose was incorrect and caused a segfault randomly during testing.

The segfault can be reproduced (without this patch) by setting the random seed in fctst:

diff --git a/src/tests/fctst.c b/src/tests/fctst.c
index 13f34be..0771a57 100644
--- a/src/tests/fctst.c
+++ b/src/tests/fctst.c
@@ -410,6 +410,7 @@ int main (int argc, char **argv)
   int i;
 
   srand ((unsigned int)time (NULL));
+  srand(1591903824);
 
   if (rand () % 2)
   {

Incidentally it's probably not a great idea to have a random number involved in a test.

Anyway, this patch fixes this problem, but I would prefer someone verify the correctness of the fix, as it's rather obscure.

I am now looking at this because I want to update the Siconos package to 4.4.0, but for this we need to have a new fclib release that includes the new functions related to rolling problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant