CppCon 2018: Simon Brand “How C++ Debuggers Work”

  Рет қаралды 29,200

CppCon

CppCon

Күн бұрын

Пікірлер: 22
@onceuponapriori
@onceuponapriori 2 жыл бұрын
What a great talk and quite a good sport answering so many questions in the middle of his talk!
@CppCon
@CppCon 2 жыл бұрын
Glad you enjoyed it!
@tetraphobie
@tetraphobie Жыл бұрын
Nice talk! One thing to note is that in the explanation of how functions are called by the debugger (38:25), Simon said "JIT compile to machine code". To clarify, from my experience (and looking at the source code for GDB), what GDB does when you call a precompiled function is a bunch of trickery with the debuggee's state, like adding a dummy call stack frame and calling the memory allocation function on behalf of the debuggee. But ultimately, it will transfer execution to the original pre-compiled function and let it do the job. Simon mentions that LLDB does JIT compile the expressions being evaluated so I presume it would do that for the function call "shim" as well, but I don't think it would re-compile the function being called, either. (Unless it's a template function or some other special case, and you're using a modern LLDB version with experimental features enabled.) Just wanted to clarify that detail.
@barrettellisadair
@barrettellisadair 2 жыл бұрын
Phenomenal talk in every regard. Thanks!
@LesleyLai
@LesleyLai 6 жыл бұрын
One of the best talks in CppCon this year I attended.
@deutschWallah
@deutschWallah 4 ай бұрын
Really good Simon Brand.
@mrlithium69
@mrlithium69 6 жыл бұрын
I was trying to remember where I saw this guy last, it was this: "CppCon 2018: Brand & Nash “What Could Possibly Go Wrong?: A Tale of Expectations and Exceptions”" also a useful talk.
@muhammadhabibjawady552
@muhammadhabibjawady552 6 жыл бұрын
Also : How to write well-behaved value wrappers (2018) hhh
@henke37
@henke37 6 жыл бұрын
"So this is how stack unwinding would work if you have easy access to frame pointers." (casual ohcrap) "Sometimes you don't."
@AbhinavGupta-i6m
@AbhinavGupta-i6m 9 ай бұрын
Amazing video! Thank you so much!
@mrlithium69
@mrlithium69 6 жыл бұрын
@30:50 He explains that the ptrace only reads 1 word at a time. Then he gives the alternative of "process_vm_readv" which I decided to look up and found this useful kernel doc: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fcf634098c00dd9cd247447368495f0b79be12d1 It seems to be known as CROSS_MEMORY_ATTACH which seems to ne enabled by default? and has security implications, ie: other processes are allowed to access other processes virtual memory space; although I am not qualified enough to assess these implications. I think this process_vm_readv needs more explanation on if/how this mechanism might be abused.
@mrlithium69
@mrlithium69 6 жыл бұрын
This document from Microsoft about how Windows does the security descriptors makes a lot more sense to me, docs.microsoft.com/en-us/windows/desktop/procthread/process-security-and-access-rights . Where you have to manually assign the PROCESS_VM_READ access right with SetSecurityInfo() and it requires the SeDebugPrivelege in your user token to do so, before you are allowed to do anything with another process's memory. So I still don't know how Linux compares to this. If anyone wants to explain...
@mrlithium69
@mrlithium69 6 жыл бұрын
Interestingly, Alex Ionescu wrote about a similar but opposite vulnerability, where he is concerned about malware turning themselves into Windows Protected Processes (where PROCESS_VM_READ, among other things, is disabled), so Anti-Virus/Anti-Malware won't be able to scan the address space to detect threats. www.alex-ionescu.com/?p=34
@robinbuster1323
@robinbuster1323 6 жыл бұрын
56:55 The annotation should read ptrace calls not petrie skulls
@danielro1209
@danielro1209 3 жыл бұрын
Very enlightening👍
@CppCon
@CppCon 3 жыл бұрын
Glad you think so!
@informant09
@informant09 6 жыл бұрын
Great talk!
@AleksandrSerov-rn2cn
@AleksandrSerov-rn2cn 2 жыл бұрын
Can't find slides on github by link in description
@CppCon
@CppCon 2 жыл бұрын
Sorry, these slides are unfortunately unavailable.
@lpadgett23
@lpadgett23 Жыл бұрын
They might be at the QR code that pops onto the screen around minute 52?
@fahimp3
@fahimp3 6 жыл бұрын
11:08 I got so scared! Lmfao
@Nuclearblastdrone
@Nuclearblastdrone 6 жыл бұрын
Stylówe ma nie do podrobienia
CppCon 2018: Jason Turner “Applied Best Practices”
1:03:19
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
CppCon 2018: Jason Turner “Surprises in Object Lifetime”
1:01:28
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН