summaryrefslogtreecommitdiffstats
path: root/results/classifier/zero-shot/118/i386/1894029
blob: e5cd5fe8b612c66598565b78a405f6aa7507e838 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
i386: 0.969
ppc: 0.837
performance: 0.822
peripherals: 0.809
device: 0.754
mistranslation: 0.696
debug: 0.645
graphic: 0.627
assembly: 0.619
user-level: 0.533
architecture: 0.515
PID: 0.485
semantic: 0.449
kernel: 0.395
register: 0.353
x86: 0.350
vnc: 0.320
permissions: 0.302
arm: 0.292
socket: 0.223
network: 0.223
boot: 0.221
hypervisor: 0.213
VMM: 0.202
TCG: 0.186
KVM: 0.173
virtual: 0.158
files: 0.153
risc-v: 0.111

qemu-i386 malloc error

Hi!I use qemu-i386-static on 64 bit machines.And memory request succeeded, but the pointer is wrong.
This is my test program:

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv)
{
        void *pa=0,*pb=0,*pc=0,*pd=0;
        pa = malloc(sizeof(uint32_t));
        pb = malloc(sizeof(uint32_t));
        pc = malloc(4);
        pd = malloc(4);
        printf("pa: 0x%x\n",pa);
        printf("pb: 0x%x\n",pb);
        printf("pc: 0x%x\n",pc);
        printf("pd: 0x%x\n",pd);
        printf("uint32_t:%d\n",sizeof(uint32_t));
        free(pa);
        free(pb);
        free(pc);
        free(pd);
        return 0;
}

And it is wrong:

pa: 0x400051a0
pb: 0x400051b0
pc: 0x400051c0
pd: 0x400051d0
uint32_t:4

Why did I apply for 4 bytes of space, but the pointer only increased by 2 bytes??
Is it a BUG??

Please stop asking questions using a bug tracking system, this is rude.

No it is not a bug, it appears you can't do simple arithmetics, -- the pointer is increased by 16 bytes not 2.