Evan Martin (evan) wrote in evan_tech,
Evan Martin

dean schools me on assembly

An old friend was in town the past few weeks and we worked together a bit. His background is in "the hacking scene" so I always learn a ton from him. One event in particular for this post: in debugging a crash* where the backtrace indicated a jump to a garbage address, he immediately dropped to disassembly and pointed out the vtable call, and from there worked out the relevant types (what was expected, what was pointed at concretely) by examining memory.

I was struck by this in how different it was from how I'd have approached the problem (which can maybe be summarized as "stare at it really hard"). I can follow assembly when pressed but it would not have occurred to me to start from there. It also struck me how few people I know would even be able to recognize what calling through a vtable looks like in assembly (especially Intel syntax!), and how this is plainly a hole in my education / skill set.

Of course, one of my officemates is one of those people (and he's years younger than me, so that's no excuse). He explained he'd started out programming in assembly because he didn't have access to a compiler when he was little. Some people are just hard core.

* The problem ended up being a subclass's override of a virtual function where the superclass's function changed its type, causing the subclass code to no longer match and override. This was all far removed from the crash, of course. An extra twist of irony was that it only exhibited on a Digg article about Chrome working on Linux.
Tags: chromium, hacking

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.