Re: [PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers

2023-11-24 Thread Dan Hoffman
Yes, that fixes my issue. I was receiving two errors with the sanitizers: 1. UBsan complaining that the (garbage) value didn't have the required alignment of the type 2. ASan complaining about some memory failure by read/write/accessing it On Fri, Nov 24, 2023 at 8:02 AM Markus Armbruster wrote:

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-23 Thread Dan Hoffman
I went ahead and wrote a clang-tidy pass that attempts to find other cases of this behavior (i.e. compile-time short-circuit behavior that could lead to undefined references). All of these cases should also be caught by `-Wunreachable-code`, but that uncovers a lot and I'd like a green light before

Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events

2023-11-21 Thread Dan Hoffman
bump On Sat, Nov 18, 2023 at 5:13 PM Daniel Hoffman wrote: > > This conversion is pretty straight-forward. Standardized some formatting > so the +0 and +4 offset cases can recycle the same message. > > Signed-off-by: Daniel Hoffman > --- > hw/timer/hpet.c | 55 +---

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-21 Thread Dan Hoffman
to resolve this patch. If any of you need anything else, please let me know. On Tue, Nov 21, 2023 at 12:28 PM Dan Hoffman wrote: > > I'm writing a patch to clang's constant folding to address this case > (doesn't seem too difficult). I'll either follow up with a link

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-21 Thread Dan Hoffman
t; > On Mon, Nov 20, 2023 at 11:20:52AM +0100, Philippe Mathieu-Daudé wrote: > > (Cc'ing Eric) > > > > On 20/11/23 10:28, Michael S. Tsirkin wrote: > > > On Sun, Nov 19, 2023 at 07:34:58PM -0600, Dan Hoffman wrote: > > > > As far as I can tell, yes. An

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Dan Hoffman
As far as I can tell, yes. Any optimization level above O0 does not have this issue (on this version of Clang, at least) On Sun, Nov 19, 2023 at 4:54 PM Philippe Mathieu-Daudé wrote: > Hi, > > On 19/11/23 21:31, Daniel Hoffman wrote: > > `kvm_enabled()` is compiled down to `0` and short-circuit

Re: [PATCH] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Dan Hoffman
Submitted a v3 with the minimum reproducible build configuration On Sun, Nov 19, 2023 at 2:25 PM Michael S. Tsirkin wrote: > > On Sun, Nov 19, 2023 at 02:19:25PM -0600, Dan Hoffman wrote: > > Clang 16.0.6 > > > > I can re-submit with the compiler and version if that hel

Re: [PATCH] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Dan Hoffman
Clang 16.0.6 I can re-submit with the compiler and version if that helps. On Sun, Nov 19, 2023 at 2:02 PM Michael S. Tsirkin wrote: > > On Sun, Nov 19, 2023 at 11:03:54AM -0600, Dan Hoffman wrote: > > On Sun, Nov 19, 2023 at 1:23 AM Michael S. Tsirkin wrote: > > > > >

Re: [PATCH] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Dan Hoffman
On Sun, Nov 19, 2023 at 1:23 AM Michael S. Tsirkin wrote: > > On Sat, Nov 18, 2023 at 10:25:31AM -0800, Daniel Hoffman wrote: > > `kvm_enabled()` is compiled down to `0` and short-circuit logic is > > used to remmove references to undefined symbols at the compile stage. > > Some build configuratio

Re: [PATCH] hw/virtio: added virtio-serial test cases

2023-02-22 Thread Dan Hoffman
Is there interest in this? On Fri, Nov 11, 2022 at 10:33 PM Daniel Hoffman wrote: > > The previous test cases for virtio-serial only tested initialization of > the device. I've included four new test cases: rx for virtconsole, tx > for virtconsole, rx for virtserialport, tx for virtserialport. I