[all-commits] [llvm/llvm-project] 22558c: [OpenMP] libomp: Fix possible NULL dereferences

Andrey Churbanov via All-commits all-commits at lists.llvm.org
Mon Dec 7 08:09:43 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22558c8501eaf5e7547ee13fa5a009efdec6dc90
      https://github.com/llvm/llvm-project/commit/22558c8501eaf5e7547ee13fa5a009efdec6dc90
  Author: AndreyChurbanov <andrey.churbanov at intel.com>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M openmp/runtime/src/kmp_debugger.cpp
    M openmp/runtime/src/kmp_itt.inl
    M openmp/runtime/src/kmp_lock.cpp
    M openmp/runtime/src/kmp_str.cpp
    M openmp/runtime/src/kmp_str.h

  Log Message:
  -----------
  [OpenMP] libomp: Fix possible NULL dereferences

Check pointer returned by strchr, as it can be NULL in case of broken
format of input string. Introduced new function __kmp_str_loc_numbers
for fast parsing of numbers only in the location string.
Also made some cleanup of __kmp_str_loc_init declaration and usage:
- changed type of init_fname parameter to bool;
- changed input from true to false in places where fname is not used.

Differential Revision: https://reviews.llvm.org/D90962




More information about the All-commits mailing list