I installed Ubuntu 10.04 64-bit version to a machine and then installed Flash, I then found Firefox crashing randomly. Starting Firefox from the terminal shows the debugging output (errors and warnings), the final line when it crashes was the rather vague statement:

Illegal instruction

It did this with both the 32bit and 64bit versions of Flash. It turns out that later 64 bit processors have an instruction called 'lahf_lm' and the binary blob that is Flash uses this instruction. Earlier processors do not have this instruction, so when Flash tries to use this instruction, it is killed by the OS.

A Gentoo user called Maks Verver, implemented (i.e. emulated) this processor instruction in software. You compile a small C library and put it in the same Firefox plugin directory as Flash.

The C library is available here.

Compile it using this command:

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

Then copy it to /usr/lib/mozilla/plugins

More information is available in the Gentoo bug report and in the Ubuntu Forums.

This article, derived from AMD64 Ubuntu 10.04 and Flash, is available under a Creative Commons License