Branch: Tag:

2014-02-21

2014-02-21 15:02:59 by Per Hedbor <ph@opera.com>

Avoid crashing when using threads with debug mode on

619: Inside #if defined(PROFILING) and #if defined(PROFILING_DEBUG)
   " unlocked: %" PRINT_CPU_TIME "\n",    ts, now, ts->state.unlocked_time);   #endif - #ifdef PIKE_DEBUG -  if (now < -Pike_interpreter.unlocked_time) { -  pike_fatal_dloc("Time at swap in is before time at swap out." -  " %" PRINT_CPU_TIME " < %" PRINT_CPU_TIME -  "\n", now, -Pike_interpreter.unlocked_time); -  } - #endif + /* This will not work, since Pike_interpreter_pointer is always null here... */ + /* #ifdef PIKE_DEBUG */ + /* if (now < -Pike_interpreter.unlocked_time) { */ + /* pike_fatal_dloc("Time at swap in is before time at swap out." */ + /* " %" PRINT_CPU_TIME " < %" PRINT_CPU_TIME */ + /* "\n", now, -Pike_interpreter.unlocked_time); */ + /* } */ + /* #endif */    ts->state.unlocked_time += now;    }   #endif