1. 04 7月, 2016 1 次提交
  2. 02 7月, 2016 1 次提交
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · 96b39d83
      Peter Maydell 提交于
      Only trivial fixes.
      
      # gpg: Signature made Fri 01 Jul 2016 13:39:06 BST
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <gkurz@fr.ibm.com>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
      # gpg:                 aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9p: synth: drop v9fs_ prefix
        9p: don't include <sys/uio.h>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      96b39d83
  3. 01 7月, 2016 36 次提交
  4. 30 6月, 2016 2 次提交
    • E
      qapi: Fix memleak in string visitors on int lists · db486cc3
      Eric Blake 提交于
      Commit 7f8f9ef1 introduced the ability to store a list of
      integers as a sorted list of ranges, but when merging ranges,
      it leaks one or more ranges.  It was also using range_get_last()
      incorrectly within range_compare() (a range is a start/end pair,
      but range_get_last() is for start/len pairs), and will also
      mishandle a range ending in UINT64_MAX (remember, we document
      that no range covers 2**64 bytes, but that ranges that end on
      UINT64_MAX have end < begin).
      
      The whole merge algorithm was rather complex, and included
      unnecessary passes over data within glib functions, and enough
      indirection to make it hard to easily plug the data leaks.
      Since we are already hard-coding things to a list of ranges,
      just rewrite the thing to open-code the traversal and
      comparisons, by making the range_compare() helper function give
      us an answer that is easier to use, at which point we avoid the
      need to pass any callbacks to g_list_*(). Then by reusing
      range_extend() instead of duplicating effort with range_merge(),
      we cover the corner cases correctly.
      
      Drop the now-unused range_merge() and ranges_can_merge().
      
      Doing this lets test-string-{input,output}-visitor pass under
      valgrind without leaks.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1464712890-14262-4-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Comment hoisted out of loop]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      db486cc3
    • E
      qapi: Simplify use of range.h · 7c47959d
      Eric Blake 提交于
      Calling our function g_list_insert_sorted_merged is a misnomer,
      since we are NOT writing a glib function.  Furthermore, we are
      making every caller pass the same comparator function of
      range_merge(): any caller that would try otherwise would break
      in weird ways since our internal call to ranges_can_merge() is
      hard-coded to operate only on ranges, rather than paying
      attention to the caller's comparator.
      
      Better is to fix things so that callers don't have to care about
      our internal comparator, by picking a function name and updating
      the parameter type away from a gratuitous use of void*, to make
      it obvious that we are operating specifically on a list of ranges
      and not a generic list.  Plus, refactoring the code here will
      make it easier to plug a memory leak in the next patch.
      
      range_compare() is now internal only, and moves to the .c file.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1464712890-14262-3-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7c47959d