[gmx-developers] make_ndx 4.0 segfaults with tprs

Erik Lindahl lindahl at cbr.su.se
Tue Oct 14 14:00:19 CEST 2008


On Oct 14, 2008, at 1:53 PM, David van der Spoel wrote:

> Carsten Kutzner wrote:
>> Hi,
>> we have a problem with make_ndx of Gromacs 4.0 here. While it works
>> fine with gro files, it always segfaults when it has to deal with
>> a tpr file. I have an older version dated 2008-08-11 in which the
>> problem is not present. I have attached some debugger information.
> I have similar memory problems in other parts of the code.
> I thought of implementing something akin to ElectricFence  
> functionality into the smalloc routines, which would be turned on  
> whenever you select the -debug option. Do you think that would be  
> useful?

I've thought about it too, but decided not to; it just adds another  
layer of complexity.

In the long run I think it's much better if we start using the  
standard C (or C++ if we go that way...) memory allocation calls.
It is easier to understand for a new programmer, and just a couple of  
more keystrokes for everyone else.

This would make it trivial to use any of the really advanced memory  
debuggers out there, rather than rolling our own weaker version.



More information about the gromacs.org_gmx-developers mailing list