[all-commits] [llvm/llvm-project] 62a6d9: Do not cache hardcoded formats in FormatManager

adrian-prantl via All-commits all-commits at lists.llvm.org
Tue Dec 10 15:56:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 62a6d9770450f93a2dcdf04710a73341af2f54fa
      https://github.com/llvm/llvm-project/commit/62a6d9770450f93a2dcdf04710a73341af2f54fa
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M lldb/include/lldb/DataFormatters/FormatManager.h
    A lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile
    A lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py
    A lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c
    A lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c
    M lldb/source/DataFormatters/FormatManager.cpp

  Log Message:
  -----------
  Do not cache hardcoded formats in FormatManager

The cache in FormatCache uses only a type name as key. The hardcoded
formats, synthetic children, etc inspect an entire ValueObject to
determine their eligibility, which isn't modelled in the cache. This
leads to bugs such as the one in this patch (where two similarly named
types in different files have different hardcoded summary
providers). The problem is exaggerated in the Swift language plugin
due to the language's dynamic nature.

rdar://problem/57756763

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




More information about the All-commits mailing list