[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() a
From: |
Andrew Jones |
Subject: |
Re: [Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() as non-returning functions |
Date: |
Fri, 3 Aug 2018 14:47:54 +0200 |
User-agent: |
NeoMutt/20180622 |
On Fri, Jul 20, 2018 at 04:39:39PM +0100, Andre Przywara wrote:
> exit() and abort() are functions that never return, and (at least)
> GCC has an attribute to flag those functions accordingly. This allows
> the compiler to do further optimizations and to omit various warnings
> about uninitialized variables, for instance.
> Since the actual "play-dead" function is in (inline) assembly, the
> compiler does not recognize its fatal nature, so help it with the
> __builtin_unreachable() hint.
> Flag the prototypes of our fatal functions accordingly.
>
> Signed-off-by: Andre Przywara <address@hidden>
> ---
> lib/arm/io.c | 1 +
> lib/libcflat.h | 7 ++++---
> lib/powerpc/io.c | 1 +
> lib/x86/io.c | 1 +
> 4 files changed, 7 insertions(+), 3 deletions(-)
>
Reviewed-by: Andrew Jones <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() as non-returning functions,
Andrew Jones <=