Re: [PATCH] audio/jack: fix use after free segfault

2020-08-20 Thread Christian Schoenebeck
On Mittwoch, 19. August 2020 17:57:35 CEST Geoffrey McRae wrote: > > The ringbuffer implementation looks a bit wild: > > > > /* read PCM interleaved */ > > static int qjack_buffer_read(QJackBuffer *buffer, float *dest, int > > size) > > { > > > > assert(buffer->data); > > const int sample

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
On 2020-08-20 01:51, Christian Schoenebeck wrote: On Mittwoch, 19. August 2020 14:51:52 CEST Geoffrey McRae wrote: >> > What latencies do you achieve BTW with Windows guests? >> >> Never tested, it's not the reason why I use jack. > > Surpring that you never checked the min. latency there, as yo

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Christian Schoenebeck
On Mittwoch, 19. August 2020 14:51:52 CEST Geoffrey McRae wrote: > >> > What latencies do you achieve BTW with Windows guests? > >> > >> Never tested, it's not the reason why I use jack. > > > > Surpring that you never checked the min. latency there, as you nailed > > quite an > > ambitous jack d

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Gerd Hoffmann
Hi, > Even still this is clearly a design flaw in the Jack2 library. Agreeing here. Bugs in apps should be fixed in apps. It isn't the libraries business to workaround them. take care, Gerd

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
On 2020-08-19 22:41, Christian Schoenebeck wrote: On Mittwoch, 19. August 2020 13:45:33 CEST Geoffrey McRae wrote: > I still don't quite get how this correlates. So you are forcing a > restart of > jackd on host side in between, for what purpose? To simulate the > Windows > client being kicke

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Christian Schoenebeck
On Mittwoch, 19. August 2020 13:45:33 CEST Geoffrey McRae wrote: > > I still don't quite get how this correlates. So you are forcing a > > restart of > > jackd on host side in between, for what purpose? To simulate the > > Windows > > client being kicked by jackd? > > For many reasons jack may nee

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
On 2020-08-19 21:30, Christian Schoenebeck wrote: On Mittwoch, 19. August 2020 00:20:07 CEST Geoffrey McRae wrote: > Could you please describe in more detail how you ran into this > situation with > your 2nd audio device? Sure. Run a Windows guest with two audio devices, let it boot up, then re

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-19 Thread Christian Schoenebeck
On Mittwoch, 19. August 2020 00:20:07 CEST Geoffrey McRae wrote: > > Could you please describe in more detail how you ran into this > > situation with > > your 2nd audio device? > > Sure. Run a Windows guest with two audio devices, let it boot up, then > restart > the jack service to trigger the r

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-18 Thread Geoffrey McRae
On 2020-08-19 04:11, Christian Schoenebeck wrote: On Dienstag, 18. August 2020 14:40:36 CEST Geoffrey McRae wrote: Due to a ridiculous commit in the Jack library, the client may have been freed already by a secondary audio device recovering its session. https://github.com/jackaudio/jack2/is

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-18 Thread Christian Schoenebeck
On Dienstag, 18. August 2020 14:40:36 CEST Geoffrey McRae wrote: > Due to a ridiculous commit in the Jack library, the client may have been > freed already by a secondary audio device recovering its session. > > https://github.com/jackaudio/jack2/issues/627 > > Until there is a proper fix for thi

Re: [PATCH] audio/jack: fix use after free segfault

2020-08-18 Thread no-reply
] audio/jack: fix use after free segfault === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT

[PATCH] audio/jack: fix use after free segfault

2020-08-18 Thread Geoffrey McRae
Due to a ridiculous commit in the Jack library, the client may have been freed already by a secondary audio device recovering its session. https://github.com/jackaudio/jack2/issues/627 Until there is a proper fix for this we can not risk using the pointer at all if we have been notified of a shut