Commit 4dc8407
committed
ui/input: do not assert() when tracing invalid input
It's possible to reach an assert() in the input tracing code by sending
some out of range input values via D-Bus for ex:
#0 0x00007fec8652186c in __pthread_kill_implementation () at /lib64/libc.so.6
#1 0x00007fec864c648e in raise () at /lib64/libc.so.6
#2 0x00007fec864ad7b3 in abort () at /lib64/libc.so.6
#3 0x00007fec864ae804 in __libc_message_impl.cold () at /lib64/libc.so.6
#4 0x00007fec864be345 in __assert_fail () at /lib64/libc.so.6
#5 0x00005597964c551e in qapi_enum_lookup[cold] ()
#6 0x000055979650514a in qemu_input_event_send_impl ()
#7 0x0000559796505a4d in qemu_input_queue_btn ()
#8 0x00007fec85780c19 in dbus_mouse_press () at /usr/bin/../lib64/qemu/ui-dbus.so
#9 0x00007fec857912fc in _g_dbus_codegen_marshal_BOOLEAN__OBJECT_UINT.part.0 () at /usr/bin/../lib64/qemu/ui-dbus.so
#10 0x00007fec874cce7c in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#11 0x00007fec874eb849 in signal_emit_unlocked_R.isra.0 () at /lib64/libgobject-2.0.so.0
#12 0x00007fec874ec66f in g_signal_emitv () at /lib64/libgobject-2.0.so.0
#13 0x00007fec85797e0a in _qemu_dbus_display1_mouse_skeleton_handle_method_call () at /usr/bin/../lib64/qemu/ui-dbus.so
Other paths in input code accept out-of-range values
(qemu_input_key_value_to_number etc). Let it pass tracing.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>1 parent 9a816f6 commit 4dc8407
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
0 commit comments