summaryrefslogtreecommitdiffstats
path: root/results/classifier/zero-shot/118/graphic/1656676
blob: 5fb7e347c6551321b85aa7c320b3814da3478588 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
graphic: 0.804
vnc: 0.758
ppc: 0.734
architecture: 0.734
device: 0.691
semantic: 0.676
performance: 0.644
PID: 0.574
TCG: 0.524
mistranslation: 0.518
i386: 0.507
debug: 0.490
network: 0.466
VMM: 0.465
x86: 0.433
register: 0.432
hypervisor: 0.411
user-level: 0.408
risc-v: 0.393
assembly: 0.356
kernel: 0.350
permissions: 0.322
peripherals: 0.313
socket: 0.312
files: 0.304
arm: 0.277
virtual: 0.270
boot: 0.159
KVM: 0.136

nvram/fw_cfg.c ‘read’ may be used uninitialized

Commit Number: b6af8ea60282df514f87d32e36afd1c9aeee28c8

The gcc version version 6.3.1 catches a new uninitialized variable in the master branch of QEMU on the Github. After looking through the function, it is really not properly assigned to a value in a certain path (the else condition of assigning read value in the code).
Here is the snippet of the condition assigning value:
    if (dma.control & FW_CFG_DMA_CTL_READ) {
        read = 1;
    } else if (dma.control & FW_CFG_DMA_CTL_SKIP) {
        read = 0;
    } else {
        dma.length = 0;
    }

Error (Warning) message is as following:
hw/nvram/fw_cfg.c: In function ‘fw_cfg_dma_transfer’:
hw/nvram/fw_cfg.c:372:16: error: ‘read’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Solution:
You can fix this by either assign a proper initial value when defining it, or give a proper value in the else condition. 
Sorry that I don't have a patch for this. I'm not sure whether to assign 1 or 0 in the else condition.

This has been fixed here already:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=baf2d5bfbac#patch6