title: Core is getting generated when the alarm goes off
body: <p>I'm trying to call the func1 for 3 times using SIGALRM but there is crash happen and core is getting generated intermittently.</p>
  <p>This is the  sample func:</p>
  <pre><code>int func_incr++;
  volatile sig_atomic_t valData=0;
  void alarm_hdlr(int signum);
  {         
      func_incr++;
      valData = 1;
  }
  
  void func1()
  {  
      signal(SIGALRM, alarm_hdlr);
      alarm(300);
      while(func_incr !=3)
      {             
          if(valData) // while debugging using gdb, in this line SIGABRT signal is received (Thread 1 &quot;func1&quot; SIGABRT signal received)
          {
              valData=0;
              func1();      
          }
      }     
  }
  
  int func1()
  {
      func2();
  }
  </code></pre>
  <p>Can someone help me?</p>
  <p>Thanks</p>