fedora 23
obsolete weakness #8

2

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

These functions are considered obsolete on most systems, and very non-portable.

File Name:

glibc-2.22/sysdeps/unix/sysv/linux/raise.c

Context:

The highlighted line of code below is the trigger point of this particular Fedora 23 obsolete weakness.

     {
      /* This system call is not supposed to fail.  */
#ifdef INTERNAL_SYSCALL
      INTERNAL_SYSCALL_DECL (err);
      selftid = INTERNAL_SYSCALL (gettid, err, 0);
#else
      selftid = INLINE_SYSCALL (gettid, 0);
#endif
      THREAD_SETMEM (pd, tid, selftid);

      /* We do not set the PID field in the TID here since we might be
	 called from a signal handler while the thread executes fork.  */
      pid = selftid;
    }
  else
    /* raise is an async-safe function.  It could be called while the
       fork/vfork function temporarily invalidated the PID field.  Adjust for
       that.  */
    if (__glibc_unlikely (pid <= 0))
      pid = (pid & INT_MAX) == 0 ? selftid : -pid;

  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
}
libc_hidden_def (raise)
weak_alias (raise, gsignal) 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.