[PATCH 0/2] Make coroutine annotations ready for static analysis

Paolo Bonzini posted 2 patches 1 year, 4 months ago
Failed in applying to current master (apply log)
include/block/block-common.h | 11 +++++----
include/qemu/coroutine.h     | 43 ++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 4 deletions(-)
[PATCH 0/2] Make coroutine annotations ready for static analysis
Posted by Paolo Bonzini 1 year, 4 months ago
Clang has a generic __annotate__ attribute that can be used by
static analyzers to understand properties of functions and
analyze the control flow.

Unlike TSA annotations, the __annotate__ attribute applies to function
pointers as well, which is very fortunate because many BlockDriver
function driver run in coroutines.

Paolo

v1->v2: improved comments for patch 2

Alberto Faria (2):
  block: Add no_coroutine_fn and coroutine_mixed_fn marker
  coroutine: annotate coroutine_fn for libclang

 include/block/block-common.h | 11 +++++----
 include/qemu/coroutine.h     | 43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 4 deletions(-)

-- 
2.38.1
Re: [PATCH 0/2] Make coroutine annotations ready for static analysis
Posted by Kevin Wolf 1 year, 3 months ago
Am 16.12.2022 um 12:07 hat Paolo Bonzini geschrieben:
> Clang has a generic __annotate__ attribute that can be used by
> static analyzers to understand properties of functions and
> analyze the control flow.
> 
> Unlike TSA annotations, the __annotate__ attribute applies to function
> pointers as well, which is very fortunate because many BlockDriver
> function driver run in coroutines.
> 
> Paolo
> 
> v1->v2: improved comments for patch 2

Thanks, applied to the block branch.

Kevin