text stringlengths 0 2.35k |
|---|
**Natalie Pistunovich:** What's a functionality that you really like? |
**Matan Peled:** Um... |
**Natalie Pistunovich:** The static checker that you will build, what will it have? |
**Matan Peled:** \[36:02\] So one of the harder things to do with static analysis - and it's not like a tool in and of itself, it's a way to get there, but it's called points-to analysis, because even in languages that don't have pointers, you usually have references, which means that one thing references another thing... |
**Mat Ryer:** Mm-hm. |
**Matan Peled:** So if you know what this variable points to right now, where is the thing that was allocated, what's its dynamic type, what thing it really is, then you can make all other static analysis basically stronger, because now they can know more things. They know that "Oh, this is a pointer. I now know where ... |
So that's static analysis that I thing is really cool, it's really difficult, because programmers can do whatever they like, and you need to somehow constrain this chaos... But yes, that's what I want to do well. |
**Mat Ryer:** Yeah, that feels like a problem that would be much easier solved at runtime. |
**Matan Peled:** Definitely. At runtime you just know what it is. You don't have to check it. At runtime you have other problems. Let's say you traced your programmer and now you have this huge file of \[unintelligible 00:37:46.23\] of where everything went, and you still have to sort out that trace, to find the way th... |
**Mat Ryer:** It helps you put bugs into your program? What's a reverse debugger? |
**Natalie Pistunovich:** It sounds like fuzzing. |
**Matan Peled:** A debugger that goes forward - you basically say "step" and it goes forward one instruction, right? |
**Mat Ryer:** Oh, right. Yeah, yeah. |
**Matan Peled:** Well, a reverse debugger allows you to step back and go back in time to what happened before. |
**Mat Ryer:** Oh. Time-traveling debugger. |
**Matan Peled:** Exactly. |
**Mat Ryer:** That sounds amazing. |
**Matan Peled:** It is. It's incredible. It's a fantastic bit of engineering. |
**Mat Ryer:** But does it just keep a snapshot of the state at every point, or is it more intelligent than that? Because some operations you lose information, I guess, don't you? How does it go backwards in time? Is it time-travel? |
**Matan Peled:** Basically, that's what it does. It keeps operations at every point. But there's so much bookkeeping that you have to keep up with in order to do that... Because obviously, you can't just after every machine opcode keep state, because that will blow up basically no time at all. And there are other thing... |
So what it basically does is keep snapshots, but not after every point; only before things that input or output. It figures that the rest of them it can just calculate from that. |
**Mat Ryer:** Gotcha. Yeah. I think that makes sense. That does sound really cool. I wonder if we've got that for Go. I've never heard of it for Go, but maybe. |
**Matan Peled:** \[40:04\] So it might just work with Go, because -- I don't know, let's check. |
**Natalie Pistunovich:** Everybody's googling. |
**Mat Ryer:** Yeah, I think it might work. I've found "Debugging a flaky Go test with Mozilla rr." |
**Matan Peled:** Yeah, because it works at the assembly level. So it cares about machine opcode. And if it compiles into machine opcode, then it can work with it. |
**Mat Ryer:** Oh, that's great. |
**Matan Peled:** And yeah, it's hard to use, and you're stuck with a debugger that looks like GDB, which is not the most user-friendly of interfaces... But it does work. It does do the thing that it promises to do, which is very cool. |
**Mat Ryer:** Well, it's a good opportunity for somebody to build a tool, or integrate it into an IDE then, in that case, if it's just got that kind of text interface. |
**Matan Peled:** Yeah, definitely. I'm sure that JetBrains or whoever are on it. |
**Mat Ryer:** Other IDEs are available... |
**Matan Peled:** That's true. |
**Mat Ryer:** I have to just say that for legal reasons. Actually, I don't think I do, but i say it. Yeah, I bet they are. |
**Natalie Pistunovich:** Also, if anyone is looking for an interesting talk title, for any upcoming conference, I think this is a topic I definitely never heard of. |
**Mat Ryer:** Yeah, I would love to hear a talk on all this, actually. If Matan's not gonna do it, someone should. |
**Matan Peled:** Yeah. So dynamic analysis - let's talk a bit about that. Basically, static analysis helps you before you even run your program, and it can help you find bugs, and it can help you just answer questions about your program is, and how it works, and maybe answer a question about queries, finding things wit... |
**Mat Ryer:** Right. |
**Matan Peled:** But dynamic analysis is still a hard task. You basically can use the same information that you would use during compile time, but now you have all the real-time values too, so you can - instead of doing symbolic execution and trying to figure out what the values can be, you actually can know what the v... |
In some contexts you just print statements everywhere and you're done. You look at what you programmed with them, and then you're happy, and you figured it out. But sometimes print statements aren't enough. If you're doing serverless programming, with Amazon Lambda, where you write single functions and hook them up, an... |
**Natalie Pistunovich:** Or listen to the episode from last week, where Mat was talking about instrumenting. |
**Mat Ryer:** Yes. |
**Matan Peled:** Yeah. So instrumenting is like dynamic analysis, right? You're looking at what is happening. |
**Mat Ryer:** Yeah, and that's the kind of thing where -- you know, if it's running at scale, of course. That's a different picture to just the code, or just the single program itself. But yeah... So just printing lines out - that is kind of dynamic analysis, I guess. |
**Matan Peled:** Well, it is. It's a very primitive form of it... And it's not argumented by tooling, let's say it like that. And making tools for making our jobs easier is what we do as programmers, right? |
**Mat Ryer:** Yeah, absolutely. That is interesting. We even try to do it with structured logging, where now we are putting structure into the log output, so that we can use that more later. |
**Matan Peled:** Yeah. And then this structured log is almost like a trace. |
**Natalie Pistunovich:** That's definitely an interesting view. Instead of saying, "I'm just printing things" you can say "Now I'm dynamically debugging." |
**Mat Ryer:** \[44:12\] Yeah. "I'm doing dynamic analysis." But would you say Hello World is a dynamic analysis program? That's all it is, isn't it? That's probably the simplest... |
**Natalie Pistunovich:** What information does it give you? |
**Mat Ryer:** It says hello. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.