Commit 1af38cc
authored
fix(win): make symbolication and modulefinder independent of the system ANSI code page. (#1389)
* fix(win): make symbolication independent of the system ANSI code page.
* allow `NULL` module paths and symbol names.
* add an integration test that runs the example from a cyrillic directory and validates the package paths
* resolve relative paths + clean up subdir
* remove the assertion that a frame must have a function
* only assert on the frame_package being a file if it exists...
...however, no longer assert that a frame_package exists.
* isolate package assertions to new test
* don't conflate checking any function/package with checking package file validity
* also adapt the windows modulefinder to be independent system ACP.
The szExePath generated for actual UTF-8 paths was already filled with mojibake :-) so LoadLibrary couldn't find any local modules.
This is actually connected to the symbolication:
* in the server, if a module was found, the backend would assign packages to frames based on the instruction address and the module address range
* if the module couldn't be found, as was the case previously, it had to use the frame package provided
So, now we fixed both and they should overlap.
* update the CHANGELOG
* explicitly specify `PSAPI_VERSION` because we only want to link kernel32
* check string_from_wstr return values
* use a heap-allocated 32K buffer for module paths
* use a heap-allocated 32K buffer for symbol paths
* move allocation into wrapping if
* format after webui edit1 parent f2eaa5e commit 1af38cc
File tree
5 files changed
+175
-26
lines changed- src
- modulefinder
- symbolizer
- tests
5 files changed
+175
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
95 | 128 | | |
96 | 129 | | |
97 | 130 | | |
| |||
101 | 134 | | |
102 | 135 | | |
103 | 136 | | |
| 137 | + | |
104 | 138 | | |
105 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
106 | 142 | | |
107 | | - | |
108 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
109 | 161 | | |
110 | | - | |
111 | | - | |
| 162 | + | |
112 | 163 | | |
113 | 164 | | |
114 | 165 | | |
| |||
120 | 171 | | |
121 | 172 | | |
122 | 173 | | |
123 | | - | |
| 174 | + | |
124 | 175 | | |
125 | 176 | | |
126 | 177 | | |
127 | | - | |
| 178 | + | |
128 | 179 | | |
| 180 | + | |
| 181 | + | |
129 | 182 | | |
130 | 183 | | |
131 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 49 | + | |
| 50 | + | |
34 | 51 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 52 | + | |
| 53 | + | |
38 | 54 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
42 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
43 | 63 | | |
44 | 64 | | |
45 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
49 | 105 | | |
50 | 106 | | |
51 | 107 | | |
| |||
0 commit comments