How to crash your iTunes

刚刚发现了一个保证 iTunes 能 crash 的方法,屡试不爽,如下。

创建一个叫做 proxy.pac 的文件 (名字随便起),内容是:

function FindProxyForURL(url, host)
{
    if (isInNet(host, "72.32.231.8", "255.255.255.0")) 
        return "SOCKS 127.0.0.1:7777";
    return "DIRECT";
}

这是一个完全合法的代理服务器自动配置文件

打开 System Preferences -> Network -> Advanced -> Proxies,选择 Configure Proxies: Using a PAC file, 然后在 PAC file url 中填入上面创建的这个 proxy.pac 文件的路径。

打开 iTunes,访问 iTunes Store,每次 iTunes 都会这样崩溃掉:

Thread 7 Crashed:
0   com.apple.JavaScriptCore        0x946f2940 WTF::fastRealloc(void*, unsigned long) + 3680
1   com.apple.JavaScriptCore        0x9476a2f2 KJS::ArrayInstance::put(KJS::ExecState*, 
unsigned int, KJS::JSValue*) + 1346
...
7   com.apple.JavaScriptCore        0x9473ab0c JSObjectCallAsFunction + 220
8   com.apple.CFNetwork             0x91db848a CallFindProxyForURL + 297
9   com.apple.CFNetwork             0x91dba4d9 executionContextPerform + 177
10  com.apple.CoreFoundation        0x94062615 CFRunLoopRunSpecific + 3141
11  com.apple.CoreFoundation        0x94062d54 CFRunLoopRun + 84
12  com.apple.iTunes                0x00281521 0x1000 + 2622753
13  com.apple.iTunes                0x002818b4 0x1000 + 2623668
14  com.apple.iTunes                0x0020b47c 0x1000 + 2139260
15  libSystem.B.dylib               0x965f16f5 _pthread_start + 321
16  libSystem.B.dylib               0x965f15b2 thread_start + 34

看起来像是 Safari 4 Preview 带来的问题。

Author: Jiang Jiang

A software engineer from China, working on some OS for a fruit company. Interested in typography and science fiction.

Leave a Reply

Your email address will not be published. Required fields are marked *