Using some variable with the name tcache in the c code and compile with debug symbols, will cause errors in the output of heap bins.
I am not sure, if this problem also occurs for other variable names.
Do you read the docs and look at previously closed issues/PRs for similar cases?
No
Architecture impacted
[X] X86
[ ] X64
[ ] ARM
[ ] ARM64
[ ] MIPS
[ ] MIPS64
[ ] PPC
[ ] PPC64
[ ] RISCV
Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
Compiling with -g causes problems when using command heap bins:
#include <stdlib.h>
int main(){
void * tcache[7];
for(int i = 0; i < 7; i ++){
tcache[i] = malloc(0x80);
*(char *)tcache[i] = i+1;
}
for(int i = 0 ; i < 7 ; i++){
free(tcache[i]);
}
}
But renaming tcache variable, will fix the problem again.
Minimalist test case
Use this field for a minimal code to compile and spot the issue:
// compile with gcc -g
#include <stdlib.h>
int main(){
void * tcache[7];
for(int i = 0; i < 7; i ++){
tcache[i] = malloc(0x80);
*(char *)tcache[i] = i+1;
}
for(int i = 0 ; i < 7 ; i++){
free(tcache[i]);
}
}
GEF+GDB version
Operating System
Arch Linux
Describe the issue you encountered
Using some variable with the name tcache in the c code and compile with debug symbols, will cause errors in the output of
heap bins
. I am not sure, if this problem also occurs for other variable names.Do you read the docs and look at previously closed issues/PRs for similar cases?
No
Architecture impacted
Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
Compiling with -g causes problems when using command
heap bins
:But renaming tcache variable, will fix the problem again.
Minimalist test case
Use this field for a minimal code to compile and spot the issue:
Additional context?