[all-commits] [llvm/llvm-project] 1127ef: [libcxx] Error out if __libcpp_mbsrtowcs_l fails i...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Nov 3 07:15:47 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1127ef789c02e735357c9c9f2ffaf6291dc8e6d7
      https://github.com/llvm/llvm-project/commit/1127ef789c02e735357c9c9f2ffaf6291dc8e6d7
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M libcxx/src/locale.cpp

  Log Message:
  -----------
  [libcxx] Error out if __libcpp_mbsrtowcs_l fails in __time_get_storage

If __libcpp_mbsrtowcs_l outputs zero wchar_t's for week days or
month names (due to errors in the locale function setup), these are
matched all the time in __time_get_storage::__analyze, ending up in
an infinite loop, allocating more memory until killed.

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




More information about the All-commits mailing list