-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when debugged process is compiled without "-g" #3
Comments
Hi, I am sorry for deal with this issue later because I just caught cold in last 2 days. Thanks, |
I've tested it with this basic tool without -g, also stripped and also with PIE. It works but it seems to be quite slow backtracing all mallocs. I'll test with Linux games later on. |
I have the plan for add filter and put more clear data in CSV file. PS, the current issue is fixed, right? Do you mind close it and open some new issues for the current troubles. |
Yes, let's close this as it works on Ubuntu 12.04 precise at least. There are a lot more issues. E.g. Ubuntu 14.04 trusty complains about syntax errors. I also still don't get the advantage over using a C library hooking memory allocations. This is not stopping the CPU all the time and can work with parallel threads. Works so good that I saw interleaving and have to use flockfile(); fputs_unlocked(); funlockfile(); to write the memory information out with stream caching but without interleaving. Realtime stuff like OpenGL will just end the process if it detects that it's running too slow. Even just using GNU backtrace() at a depth of 3 to just get code addresses on the stack on all allocations is too slow. |
I've tested the cma tool and it only works with binaries compiled with the "-g" option. Otherwise, an exception is raised. IMHO it shouldn't crash if that information isn't available.
Breakpoint 2, 0x00007ffff7a9cf20 in malloc () from /lib/x86_64-linux-gnu/libc.so.6
Traceback (most recent call last):
File "cma.py", line 558, in
breaks[r.group(1)].event()
File "cma.py", line 360, in event
not_released_add(arch.get_ret(), size, self.memtype)
File "cma.py", line 230, in not_released_add
not_released[addr].append(get_info_line(True))
File "cma.py", line 165, in get_info_line
raise Exception
Exception
My simple malloc and static memory test tool:
The text was updated successfully, but these errors were encountered: