[PATCH] D24555: [asan] Reify ErrorGeneric

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 05:56:09 PDT 2016


filcab created this revision.
filcab added reviewers: vitalybuka, kcc, eugenis.
filcab added a subscriber: llvm-commits.
Herald added a subscriber: kubabrecka.

Finish work on PR30351 (last one, after D24551, D24552, and D24554 land)

Also replace the old ReportData structure/variable with the current_error_ static
member of the ScopedInErrorReport class.

This has the following side-effects:
  - Move ASAN_ON_ERROR(); call to the start of the destructor, instead
    of in StartReporting().
      - We only generate the error structure after the
        ScopedInErrorReport constructor finishes, so we can't call
        ASAN_ON_ERROR() during the constructor. I think this makes more
        sense, since we end up never running two of the ASAN_ON_ERROR()
        callback. This also works the same way as error reporting, since
        we end up having a lock around it. Otherwise we could end up
        with the ASAN_ON_ERROR() call for error 1, then the
        ASAN_ON_ERROR() call for error 2, and then lock the mutex for
        reporting error 1.
  - The __asan_get_report_* functions will be able to, in the future,
    provide information about other errors that aren't a "generic
    error". But we might want to rethink that API, since it's too
    restricted. Ideally we teach lldb about the current_error_ member of
    ScopedInErrorReport.

https://reviews.llvm.org/D24555

Files:
  lib/asan/asan_descriptions.h
  lib/asan/asan_errors.cc
  lib/asan/asan_errors.h
  lib/asan/asan_report.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24555.71331.patch
Type: text/x-patch
Size: 24337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160914/7a57471e/attachment.bin>


More information about the llvm-commits mailing list