22
Jul 09

Chase/WaMu Fraud-friendlyness

Turns out that if someone compromises a merchant that you shop with, such as bikenashbar.com, then they are entitled to your money as long as they can show to the bank that they have your billing/shipping information. According to Chase it’s not fraud if they steal your address along with the card number.  I recommend that people use a bank that protects their customer’s finances, one that isn’t called Chase.


21
Jul 09

Those crazy comm-central guys…

When it comes to taking on crazy tasks involving disguising code, you can always count on Joshua. This time Joshua has gone deep in Pork territory to do a very impressive rewrite (one that would not be even close to possible with anything other than Elsa-based tools) and he is blogging about it. He posted the first installment of his rewriting-with-Pork guide.

Still on the subject on mad csc-entist Joshua: Andrew Sutherland has finally gotten sick of crappy JS documentation tools and took matters into his own hands thanks to Joshua’s JSHydra tool. Checkout his blog post on how the documentation world will be a better place thanks to being able to build tools on top of *the JavaScript parser*.


14
Jul 09

VirtualBox 3.0 Rocks

With much pain I managed to convince a Vmware WinXP virtual machine to run in VirtualBox. At first it ran very sluggishly(>3 hours to do a build?), but after I turned off IO Apic stuff in Windows, it’s become disturbingly fast. It now takes 40minutes to build a wince fennec vs almost 80minutes it took on VMware server.

VirtualBox’s disk throughput is phenomenal, in fact, this is the first time I’ve seen almost-native speed disk io in virtual machine. A benchmark I tried reported 45mb/s 4K read/writes (these were cached on the linux side).

Unlike Vmware server, VirtualBox’s usb works without troubles, shared folders were easy to setup etc. It’s an awesome app, hope Sun/Oracle keeps it up.


01
Jul 09

Python GDB – Logging File IO

Python GDB Rocks!

I wanted a non-painful way to figure out what’s causing bonus file IO. I’ve noticed that gtk likes to open files, but I didn’t have the exact details. So I grabbed python gdb, and with some tips on syscalls from gdb old-timers managed to produce a report to assign blame for open()ing files to relevant Mozilla functions.

Other than the gdb-hating syscalls issue, achieving this was simple

  1. Compile python-enabled gdb(Next set of distribution releases should have it..I hope)
  2. Define a new gdb command in a python file. I called mine “taras” for lack of a better name.
  3. Set a breakpoint, attach your command to it. :
    break open
    source -p /path/to/your/script.py
    command 1
    taras
    end
  4. Have the script walk the backtrace to figure out the filename and the last Mozilla function. Log the info, issue gdb continue command.
  5. Print out a report and profit:
    python report()

Here is my script. The only nasty part here is that I had to read the filename out of a register (i’m on amd64, on 32 it’d be $esi instead of $rdi) because gdb doesn’t deal well with system calls.

I’ve never throught it would be this fun to use gdb. I always thought debuggers should be scriptable, thanks to Tom Tromey (lots of gdb tutorials on Tom’s blog) and any others who finally made this a reality.