Skip to content

Commit 8664afd

Browse files
committed
gh-149800: Declare the perf trampoline template labels as char symbols
1 parent 2d6a384 commit 8664afd

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Python/perf_trampoline.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,8 @@ typedef PyObject *(*py_evaluator)(PyThreadState *, _PyInterpreterFrame *,
172172
typedef PyObject *(*py_trampoline)(PyThreadState *, _PyInterpreterFrame *, int,
173173
py_evaluator);
174174

175-
extern void *_Py_trampoline_func_start; // Start of the template of the
176-
// assembly trampoline
177-
extern void *
178-
_Py_trampoline_func_end; // End of the template of the assembly trampoline
175+
extern char _Py_trampoline_func_start; // Start of the assembly trampoline template
176+
extern char _Py_trampoline_func_end; // End of the assembly trampoline template
179177

180178
struct code_arena_st {
181179
char *start_addr; // Start of the memory arena
@@ -334,8 +332,8 @@ new_code_arena(void)
334332
return -1;
335333
}
336334
(void)_PyAnnotateMemoryMap(memory, mem_size, "cpython:perf_trampoline");
337-
void *start = &_Py_trampoline_func_start;
338-
void *end = &_Py_trampoline_func_end;
335+
char *start = &_Py_trampoline_func_start;
336+
char *end = &_Py_trampoline_func_end;
339337
size_t code_size = end - start;
340338
size_t unaligned_size = code_size + trampoline_api.code_padding;
341339
size_t chunk_size = round_up(unaligned_size, trampoline_api.code_alignment);

0 commit comments

Comments
 (0)