回答編集履歴
2
回答に追記
test
CHANGED
@@ -89,3 +89,41 @@
|
|
89
89
|
|
90
90
|
|
91
91
|
うーん、再現しませんねー
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
---
|
96
|
+
|
97
|
+
別回答にあったようにちょっと実験
|
98
|
+
|
99
|
+
```C
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
int main()
|
104
|
+
|
105
|
+
{
|
106
|
+
|
107
|
+
unsigned char* test=(void*)0x7ffffffed210; //0x7ffffffed210が先頭メモリ
|
108
|
+
|
109
|
+
unsigned char *pointer;
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
pointer = (int)move_add(test);
|
114
|
+
|
115
|
+
printf("%p-%p\n",test,pointer); //0xfffffffffffed211
|
116
|
+
|
117
|
+
return 0;
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
```
|
124
|
+
|
125
|
+
00007FFFFFFED210-FFFFFFFFFFFED211
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
なるほど、そゆことねw
|
1
回答に追記
test
CHANGED
@@ -3,3 +3,89 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
とやってみよう
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
```C
|
12
|
+
|
13
|
+
unsigned char *move_add(unsigned char *recv_p)
|
14
|
+
|
15
|
+
{
|
16
|
+
|
17
|
+
recv_p++;
|
18
|
+
|
19
|
+
return recv_p; //0x7ffffffed211
|
20
|
+
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
int main()
|
26
|
+
|
27
|
+
{
|
28
|
+
|
29
|
+
unsigned char test[100]; //0x7ffffffed210が先頭メモリ
|
30
|
+
|
31
|
+
unsigned char *pointer;
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
pointer = move_add(test);
|
36
|
+
|
37
|
+
printf("%p-%p\n",test,pointer); //0xfffffffffffed211
|
38
|
+
|
39
|
+
return 0;
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
実行結果
|
48
|
+
|
49
|
+
000000000061FDB0-000000000061FDB1
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
ウチではこうなりますね
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
ついでに
|
58
|
+
|
59
|
+
```C
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
int main()
|
64
|
+
|
65
|
+
{
|
66
|
+
|
67
|
+
unsigned char* test=(void*)0x7ffffffed210; //0x7ffffffed210が先頭メモリ
|
68
|
+
|
69
|
+
unsigned char *pointer;
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
pointer = move_add(test);
|
74
|
+
|
75
|
+
printf("%p-%p\n",test,pointer); //0xfffffffffffed211
|
76
|
+
|
77
|
+
return 0;
|
78
|
+
|
79
|
+
}
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
00007FFFFFFED210-00007FFFFFFED211
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
うーん、再現しませんねー
|