My thoughts on Slackware, life and everything

Flash crashes Firefox on x86_64

Some people have reported that on 64-bit Slackware, and after installing Adobe’s 64-bit Flash plugin, their Firefox crashes with an “illegal instruction” error  when it loads a page containing flash video (like Youtube)…

I never had this issue, and for a lot of other people, flash works fine as well. However, the mystery remained until my friend Bruce (whose computer suffers from this crash bug, but only in Slackware, not in Gentoo) found the solution on the Gentoo bugtracker. Bruce wrote a howto on how to fix the crash .

Basically, the bug hits only certain Athlon64 CPUs which do not have the “lahf_lm” processor flag. This seems to be absent in certain processors of the “cpu family 15“. My own Athlon64 3200+ processor is from that same family but still mine has this “lahf_lm” flag (as shown in the output of the command “cat /proc/cpuinfo”).

What is the fix?

If you have an Athlon64 CPU which misses the “lahf_lm” instruction, you need to compile a small dynamic library that traps the “illegal instruction” signal and then emulates its effects. You should either place the plugin in mozilla’s plugins directory (so it’s loaded whenever the Flash plug-in is loaded) or force it to load by adding it to LD_PRELOAD environment variable. Below, I will show you how to build and install the library.

The source code written by Maks Verver is attached to the gentoo bug report I linked to earlier, and I’ve made a copy available here.

Download this “c” source file, then as root build the dynamic library “flashplugin-lahf-fix.so” using the following command (beware of line-wraps, the commands below are each a single line):

cc -fPIC -shared -nostdlib -lc -oflashplugin-lahf-fix.so flashplugin-lahf-fix.c

Copy the resulting library file “flashplugin-lahf-fix.so” to the mozilla plugin directory:

install -m0755 flashplugin-lahf-fix.so /usr/lib64/mozilla/plugins/flashplugin-lahf-fix.so

Restart your Firefox browser and check that it no longer crashes when you load a flash video.

Eric

3 Comments

  1. isaque

    Very nice post. Solved my problem.
    Thank you very much!

  2. GMcEwen

    Thanks Eric! Worked for me on Slackware64 13.1. I’m running 3400+ Stepping 0 (cpu family 15). Was drawing blanks searching for a solution until I found this entry. Should have looked here first!

  3. Spidertux

    Seems it not works with “new” firefox-3.6.6 upgrade. “The Adobe Flash plugin has crashed” on most flash page. Seems some incompatibility with new firefox “crash protection feature”. Any idea?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑