[ET Trac] [Einstein Toolkit] #1419: Cactus should produce no errors in Valgrind

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Aug 6 09:33:13 CDT 2013

#1419: Cactus should produce no errors in Valgrind
  Reporter:  sbrandt      |       Owner:                     
      Type:  enhancement  |      Status:  new                
  Priority:  minor        |   Milestone:  Cactus_4.3.0       
 Component:  Cactus       |     Version:  development version
Resolution:               |    Keywords:                     

Comment (by eschnett):

 util_Strdup is a old function, from times when strdup was not available
 everywhere. I would deprecate util_Strdup, and replace calls to this
 function by calls to strdup. This reduces code complexity and probably
 improves code speed as well.

 As to valgrind: Did you report this problem to the valgrind developers?
 The usual remedies would be (a) upgrade valgrind, or (b) upgrade libc.

 Instead of replacing all calls to strdup, you can define your own strdup
 function somewhere in the flesh, and then link statically to ensure this
 is the only definition available. This would be simpler than modifying all
 code, and would also ensure that calls within libraries (e.g. HDF5) are
 also replaced. Of course, this would be for debugging only, and would not
 be enabled for production runs.

Ticket URL: <https://trac.einsteintoolkit.org/ticket/1419#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit

More information about the Trac mailing list