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

  • münchen

    On that note: I'm living in Munich for the next week plus a few days. Do I know anyone around here? (PS: The LJ → PubSubHubbub → Reader…

  • deb/rpm diffing tools

    Dear Linux hackers, Chrome tends to push minor updates (often security) pretty frequently. We'd like to operate as a good member of the Linux…

  • emacs

    I've been using vim for a very long time -- over ten years -- but over those years I've envied more and more the way emacs integrates other software.…

  • 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.