Work: August 2006 Archives

One of my coworkers pointed out this snippet of code from ns4xPlugin.cpp in the firefox source tree. I got a kick out of it. The comments crack me up.

#ifdef BROKEN_PLUGIN_HACK
// The broken plugin has wrapped NPN callback function pointers in PPC
// TVector glue as though they were pointers to CFM TVectors. When the
// x86 attempts to execute the PPC glue, it will of course fail.
//
// What's done here is a bit unorthodox. I'm going to locate the
// TVector glue that the plugin created from ns4xPlugin::CALLBACKS by
// peeking into its symbol table, then I'm going to dissect the PPC
// machine code to get the target addresses and produce x86 machine code.
// The x86 code overwrites the PPC code in the plugin's jump table.
// The replacement code is of course executable. I know I can do this,
// because the broken plugin builds its table of TVector glue based on
// what the sample NPAPI plugin does.
//
// Watch this.

I started my new job yesterday. Operations Engineer - which really doesn't say much about what I do. I'm not even entirely certain what I do yet, but I'm sure I'll figure it out as the week progresses. We're not a BSD shop, so I spent most of my day watching things compile on Gentoo. Yes, I know. Gentoo is for ricers.

We celebrated the end of my first day with a trip to Benihanas for sushi. I've got to say, I'm not too impressed with their sushi bar. The edamame wasn't cooked for long enough. Even so, I hadn't had sushi in almost a year, so I still enjoyed myself. :)

Nathan's 5th birthday is tomorrow, but I'll be here in Austin. I miss my kiddo. I'll be flying back to Atlanta the second week of September, so I'll be able to successfully avoid any attempts to spring a birthday party on me on Friday night. Screw birthdays. We all remember how Mike screwed up last year. They are best avoided.

I am getting at least one present that I know of. Someone that wishes to remain anonymous (probably so he doesn't get tormented by his internet friends) bought me an OhMiBod. It should be here soon. Oh, and I'm supposedly considered media now - OhMiBod put me on their media coverage page. Go me!

In other news, Juniper fucked up. SEC doesn't fuck around.

Powered by Movable Type 4.12