[ET Trac] [Einstein Toolkit] #1821: Carpet may call object methods with this == NULL

Einstein Toolkit trac-noreply at einsteintoolkit.org
Wed Mar 15 15:37:08 CDT 2017

#1821: Carpet may call object methods with this == NULL
  Reporter:  rhaas     |       Owner:  eschnett           
      Type:  defect    |      Status:  reopened           
  Priority:  optional  |   Milestone:                     
 Component:  Carpet    |     Version:  development version
Resolution:            |    Keywords:                     

Comment (by rhaas):

 > (1) I don't think that CarpetLib itself calls this method, so the
 changes to {{{ggf.cc}}} should not be necessary.

 I added a comment to the code diff:

 > (2) In {{{PeriodicCarpet}}}, you could use {{{src}}} instead of
 Could be done. That seems odd though.

 > (3) The initialization of the static variable in {{{fake_data_pointer}}}
 is not thread-safe. This has actually become an issue when using Qthreads
 for parallelization.
 Correct. At the time I reported this CarpetLib was not yet thread safe (ie
 none of the Timers was) so it did not matter. Thread safe would be either
 using new() or the src trick that you suggest or making transfer_from a
 static member function that takes the current dst as eg its first

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

More information about the Trac mailing list