summaryrefslogtreecommitdiff
path: root/target/i386/hax-mem.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2017-04-27 17:55:26 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-05-05 12:09:59 +0200
commit6e9389563e56607f72562bdb72db452fcd7e7f74 (patch)
tree50d757054f098c86e7d3d37546a4325f05e76f45 /target/i386/hax-mem.c
parent31f5a726b59bda5580e2f9413867893501dd7d93 (diff)
downloadqemu-6e9389563e56607f72562bdb72db452fcd7e7f74.zip
checkpatch: Disallow glib asserts in main code
Glib commit a6a875068779 (from 2013) made many of the glib assert macros non-fatal if a flag is set. This causes two problems: a) Compilers moan that your code is unsafe even though you've put an assert in before the point of use. b) Someone evil could, in a library, call g_test_set_nonfatal_assertions() and cause our assertions in important places not to fail and potentially allow memory overruns. Ban most of the glib assertion functions (basically everything except g_assert and g_assert_not_reached) except in tests/ This makes checkpatch gives an error such as: ERROR: Use g_assert or g_assert_not_reached #77: FILE: vl.c:4725: + g_assert_cmpstr("Chocolate", >, "Cheese"); Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170427165526.19836-1-dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hax-mem.c')
0 files changed, 0 insertions, 0 deletions