Catalog Cache async task accesses un-owned StringData variable

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding 2020-08-10
    • 43
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Cache loader access un-owned variable causing use-after-free memory access error.
      These are the two different places that implement this wrong pattern:

      StringData object wraps a 'const std::string&' or a 'const char*' without copying its contents. Thus keeping alive the StringData object itself doesn't guarantee that the underlying char array won't be freed. For this reason when capturing such an object in an async task an explicit copy of the underlying data needs to be performed.

              Assignee:
              Tommaso Tocci
              Reporter:
              Tommaso Tocci
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: