Comments (7)
It shouldn't be difficult. You may look into the following files and compare with glibc's malloc.c
of version 2.13. I don't have the environment to test and verify and hence didn't include this version.
- src/heap_ptmalloc.h
- src/heap_ptmalloc.cpp
from core_analyzer.
Thank you Michael. I looked at the malloc_state in glibc-2.13 and it looks very different. Adding this fails the copy methods as the struct members are very different from the rest.
#define MALLOC_STATE_MAGIC 0x444c4541l
#define MALLOC_STATE_VERSION (0_0x100l + 1l) /_ major*0x100 + minor */
struct malloc_state {
long magic;
long version;
mbinptr av[NAV * 2 + 2];
char* sbrk_base;
int sbrked_mem_bytes;
unsigned long trim_threshold;
unsigned long top_pad;
unsigned int n_mmaps_max;
unsigned long mmap_threshold;
int check_action;
unsigned long max_sbrked_mem;
unsigned long max_total_mem;
unsigned int n_mmaps;
unsigned int max_n_mmaps;
unsigned long mmapped_mem;
unsigned long max_mmapped_mem;
int using_malloc_checking;
};
from core_analyzer.
Could you try the branch glibc-2.13? I include this glibc version in core analyzer. Let me know if it works for you or not.
from core_analyzer.
Thank you very much Michael. It worked fine on one core. Another one, failed to obtain &main_arena from gdb. It complains variable doesnt exist. I have to look into the core / gdb further , again not an issue with core_analyzer.
Thank you again for adding support for glibc-2.13.
from core_analyzer.
Hi Michael,
I am trying to decode a core file. When I try to get the & or main_arena or mp_ from gdb, it is not finding the symbol. I also tried to attach to the running process and see if the symbol is there, but same result
(gdb) p malloc
$1 = {<text variable, no debug info>} 0x7fe50263d2b0
(gdb) p &main_arena
No symbol "main_arena" in current context.
(gdb) p &mp_
No symbol "mp_" in current context.
binary is not stripped.
file bcq
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
Greatly appreciate any insights.
from core_analyzer.
@rahulgopi
Since you get one core file working, you may want to check the environment of the core that doesn't work. main_arena
and mp_
are variables in libc.so.
from core_analyzer.
I will reopen it when user data is available.
from core_analyzer.
Related Issues (20)
- heap /tu 2 will hang HOT 3
- Cannot get the "__libc_version" from the debugee HOT 7
- I have installed libc6-dbg,“(gdb) heap Failed to extract heap metadata from gv mp_ == The memory manager is assumed to be glibc 2.31 == == If this is not true, please debug with another machine with matching glibc == HOT 11
- Compile failed in WSL HOT 5
- Hi, a question not related to this project but related to your book 'Effective Debugging' HOT 2
- Command line `core_analyzer` tool HOT 2
- How to compile gdb (properly) for Debian 9 (codename Stretch) HOT 2
- gdb command 'shrobj' causes crash HOT 1
- gdb 13.1 wanted HOT 3
- will it support jemalloc for gdb 7.11.1? HOT 2
- can we remove big binaries from history HOT 10
- how to force rebuild heap info while living debug HOT 3
- App crash when calling ref in GDB 12.1 HOT 4
- can't use heap cmd in gdb which compiled by gdb-12.1 with core_analyzer src HOT 1
- release 2.23.0 miss i386-decode.c HOT 5
- Does it support Aarch64? HOT 3
- build_gdb.sh error! HOT 1
- error encountered using heap command HOT 12
- How to locate the source code that allocates this memory if a memory leak address is discovered through a heap/leak scan. HOT 3
- Adding issue template HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core_analyzer.