Segmentation fault in very long calculations

Report any suspected bugs and unexpected behavior here

Segmentation fault in very long calculations

Postby Jaakko Leppänen » Wed Aug 14, 2013 10:57 am

Some very long calculations may cause segmentation fault or some other memory-related error at the beginning of active cycles. This is because the code estimates the overall calculation time, and the string array where this time is temporarily stored overflows. The problem is easy to fix. In timestr.c, change the declaration of variable str from:

Code: Select all
  static char str[10];

to something like:

Code: Select all
  static char str[20];

This problem concerns both Serpent 1 and Serpent 2, and it was actually encountered while running Serpent 2 calculations. Even if it doesn't cause the calculation to stop, it is a memory-related issue that can cause other problems, depending on where the excess data overflows to.
- Jaakko
User avatar
Jaakko Leppänen
Site Admin
Posts: 1989
Joined: Thu Mar 18, 2010 10:43 pm
Location: Espoo, Finland

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest