blob: 188cb8fd33ca8ac5c749bf06b642281191c3f8a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
files: 0.894
performance: 0.820
other: 0.803
graphic: 0.794
semantic: 0.757
device: 0.665
vnc: 0.645
debug: 0.637
network: 0.592
permissions: 0.493
socket: 0.465
KVM: 0.463
boot: 0.459
PID: 0.458
I'm not sure. But I Think I could cause the err(include/qemu/queue.h).
Description of problem:
At file "include/qemu/queue.h", Maybe I Think QTAILQ_REMOVE could cause a Error.
```
#define QTAILQ_REMOVE(head, elm, field) do { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_circ.tql_prev = \
(elm)->field.tqe_circ.tql_prev; \
else \
(head)->tqh_circ.tql_prev = (elm)->field.tqe_circ.tql_prev; \
(elm)->field.tqe_circ.tql_prev->tql_next = (elm)->field.tqe_next; \
(elm)->field.tqe_circ.tql_prev = NULL; \
(elm)->field.tqe_circ.tql_next = NULL; \
(elm)->field.tqe_next = NULL; \
} while (/*CONSTCOND*/0)
```
If the length of the que is one, line 7 cause a segmentation fault.
Steps to reproduce:
1. Create a Que with QTAILQ_INIT
2. Add one element to que.
3. Remove the element with QTAILQ_REMOVE
Additional information:
queue.h file is located at "inclue/qemu/queue.h"
|