On Thu, 26 Nov 2020 19:44:24 +0100 Christian Schoenebeck <qemu_...@crudebyte.com> wrote:
[...] > > The only justification that'd deserve to be in the changelog of > > such a patch is something like "because this is good practice > > to rollback in case code moves to another function than main()". > > Well, the actual motivation was rather a pragmatic one: to shut up a > sanitizer's false positive, which I can understand. > Yes, this should also be mentioned in the changelog. > Another option would be using a global variable for the fd instead of a > temporary on stack. That should shut up the sanitizer as well and would not > introduce change to the program flow. > Using the same sock variable for an fd that is either passed to us or that we create is a very poor programming choice actually... :( So if the motivation is just to make "Euler Robot" happy and this can be addressed as you suggest, I personally prefer that rather than piling up fixes on broken code. > I leave that up to Greg to decide whether or not to handle this. I'm > Switzerland on this one. > This won't go into QEMU 5.2 anyway since we only merge fixes for critical bugs or regressions at this point. No hurry to decide anything now :) > Best regards, > Christian Schoenebeck > >