Fixed potentially truncated entry in stack trace
parent
5f1558ffe3
commit
4f683f01d4
|
@ -104,13 +104,13 @@ static void SDL_TrackAllocation(void *mem, size_t size)
|
|||
stack_index = 0;
|
||||
while (unw_step(&cursor) > 0) {
|
||||
unw_word_t offset, pc;
|
||||
char sym[256];
|
||||
char sym[236];
|
||||
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &pc);
|
||||
entry->stack[stack_index] = pc;
|
||||
|
||||
if (unw_get_proc_name(&cursor, sym, sizeof(sym), &offset) == 0) {
|
||||
snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, (unsigned long long)offset);
|
||||
SDL_snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, (unsigned long long)offset);
|
||||
}
|
||||
++stack_index;
|
||||
|
||||
|
|
Loading…
Reference in New Issue