Flash Player plugin in OI Hipster

I have installed Firefox 37 and added Flash Player plugin.The plugin plays music good, but trying to play video it crashes. Let’s try to know what’s going on with plugin at the moment of crash. First, find out process ID.

1552  /usr/lib/firefox37/lib/firefox-37.0/firefox.exe
1577  /usr/lib/firefox37/lib/firefox-37.0/plugin-container /usr/lib/firef

Then run truss for the process and look at the last strings.

truss -p 1577

/3:     lwp_park(0x00000000, 0)                         = 0
/1:     lwp_unpark(3)                                   = 0
/3:     open(«/dev/cpu/self/cpuid», O_RDONLY)           = 18
/10:    clock_gettime(4, 0xF25FEC08)                    = 0
/3:     ioctl(18, ((‘c'<<24)|(‘i'<<16)|(‘d'<<8 ) | 0), 0xF45EEE08) = 0
/3:     close(18)                                       = 0
/3:         Incurred fault #6, FLTBOUNDS  %pc = 0xF5195DC2
/3:           siginfo: SIGSEGV SEGV_MAPERR addr=0x00000014
/3:         Received signal #11, SIGSEGV [default]
/3:           siginfo: SIGSEGV SEGV_MAPERR addr=0x00000014

The process crashed after it had found out information about the processor. Now look at the core file.

mdb core
mdb: core file data for mapping at ef4a0000 not saved: Bad address
mdb: core file data for mapping at ef6e0000 not saved: Bad address
mdb: core file data for mapping at f19c0000 not saved: Bad address
mdb: core file data for mapping at f1de0000 not saved: Bad address
mdb: core file data for mapping at f23a0000 not saved: Bad address
mdb: core file data for mapping at f2780000 not saved: Bad address
Loading modules: [ libc.so.1 libuutil.so.1 libnvpair.so.1 ld.so.1 ]
> $C
f45eede8 0xf5195dc2(f261c000, 280, b4, 280, 280, f1a85010)
f45eee48 0xf51745e9(8046550, 280, b4, f45eeeb0, 280, 280)
f45eeed8 0xf4e02645(f4272700, 8046550, 0, b4)
f45eef08 0xf4b7d181(f4209070, fef5a000, f45eef88, f49aa20e)
f45eef88 0xf49aa236(f4209078, 0, 0, 0)
f45eefa8 0xf49aa290(f4209078, 62, f7dc12a0, fef5a000)
f45eefc8 0xf49a9f50(f4209078, 0, 0, 0)
f45eefe8 libc.so.1`_thrp_setup+0x88(f7dc1240)
f45eeff8 libc.so.1`_lwp_start(f7dc1240, 0, 0, 0, 0, 0)

ioctl gets address 0xF45EEE08 and one of the stack backtrace functions gets 0xF45EEEB0(0xF45EEE08+4). Perhaps, the error was during analysis of data from ioctl.
The structure is decribed in usr/src/uts/common/sys/cpuid_drv.h
The problem is that at 13 dec 2012 the structure from this file was changed, but the plugin was not.

Current version:
struct cpuid_get_hwcap {
char *cgh_archname;
uint_t cgh_hwcap[2];

Previous version:
struct cpuid_get_hwcap {
char *cgh_archname;
uint_t cgh_hwcap;

To play video by flash player plugin we can write a wrapper for ioctl function. The content of 2.c file is below.

#include <stdio.h>
#include <sys/types.h>
#include <stdarg.h>
#include <dlfcn.h>
typedef struct cpuid_get_hwcap_old {
char *cgh_archname;
uint_t cgh_hwcap;
} *s_cpuid_get_hwcap_old;

static int (*real_ioctl)(int fildes, int request, /* arg */ …) = 0;

int ioctl(int fildes, int request, /* arg */ …){
va_list args;
va_start(args, request);
s_cpuid_get_hwcap_old ps = va_arg(args, s_cpuid_get_hwcap_old);
if (request==((‘c'<<24)|(‘i'<<16)|(‘d'<<8 )|0) ){
ps->cgh_hwcap = 0x40435c6f;
printf(«123\nps=%s\n», ps->cgh_archname);
return 0;
real_ioctl = dlsym(RTLD_NEXT, «ioctl»);

asm(«addl    $36, %%esp\n\t»
«popl    %%ebx\n\t»
«popl    %%ebp\n\t»
«movl %0, %%eax\n\t»
«jmp *%%eax»:: «r»(real_ioctl));

return -1;

gcc  -c -fPIC 2.c
gcc -shared -fPIC -o 2.so 2.o
sudo cp 2.so /usr/lib/firefox37/lib/firefox-37.0/
sudo mv /usr/lib/firefox37/lib/firefox-37.0/plugin-container /usr/lib/firefox37/lib/firefox-37.0/plugin-container_old

and create file /usr/lib/firefox37/lib/firefox-37.0/plugin-container with this content
export LD_LIBRARY_PATH=/usr/lib/firefox37/lib/firefox-37.0/
export LD_PRELOAD=2.so
/usr/lib/firefox37/lib/firefox-37.0/plugin-container_old $@

Now plugin can play video.

Download 2.so

Andrey Sokolov

PS — the source code of 2.so library is far from perfect. Some day I’ll improve it.

HostLife - лучший платный хостинг



  1. Way cool! Some very valid points! I appreciate you penning this article and the rest of the site is also really good. Edin Artemas Hurff

  2. I was reading through some of your posts on this site and I think this website is really informative! Keep putting up. Brynn Aldo Wendye

  3. This is a unquestionably interesting post. You are doing spout with writing. Bamby Finlay Malone

  4. I was studying some of your articles on this website and I believe this web site is real informative! Continue posting. Candis Salvidor Lawlor

  5. Veganized this and it was delicious! Flavorful and moist, it was gone by the next day. Tobi Colin Lotta

  6. You made a few nice points there. I did a search on the topic and found a good number of folks will agree with your blog. Leodora Douglas Noami Karisa Web Rhody

  7. Mauris hendrerit quis nunc id tempus. Suspendisse vehicula et neque eget rutrum. Sed iaculis quam nec augue iaculis ultricies Ame Emory Catlin

  8. yah if you believe on it when you do it ,it will work for you Jackquelin Adham Rose

  9. Would certainly you be interested in exchanging links? Pauly Herby Tarah

  10. Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the site is also really good. Ketty Keven Ellis

  11. My coder is trying to persuade me to move to .net from PHP. Kelcey Roosevelt Micco

  12. Thanks for ones marvelous posting! I definitely enjoyed reading it, you could be a great author. I will be sure to bookmark your blog and will eventually come back from now on. I want to encourage continue your great writing, have a nice afternoon! Vera Ted Saul

  13. I like it when people get together and share thoughts. Great site, keep it up! Lilli Clair Eng

  14. Do you have a spam problem on this blog; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice practices and we are looking to swap solutions with other folks, why not shoot me an email if interested.| Marie-Jeanne Simeon Boggs

  15. Thanks in favor of sharing such a fastidious opinion, article is pleasant, thats why i have read it fully Rosaleen Leopold Shelah

  16. Wowza. Plague indeed. This sounds positively brutal. Good on you for seeing the silver linings. Joya Jan Colwen

  17. Wonderful article. I learn something more challenging on different blog sites everyday. It will constantly be boosting to read material from various other authors and exercise a something from their store. I?d prefer to make use of some with the content on my blog whether you don?t mind. Natually I?ll offer you a link on your internet blog. Many thanks for sharing. Timothea Sonny Diamante

  18. Diverse men extravagant way of life in the bathroom tickling their thunderous bone or captivating occasional trivia. If that sounds like your cache or boyfriend, give investing swarig.corrsnow.se/til-kvinder/hjemmelavet-suppe-okse.php in a series of bathroom readers you can knock tempered to at a parsimony shop. Outline give up to in a routine publication hat-rack from the briefness peach on, and poverty-stricken your sweetie through organizing his modish reading low-down next to the john. Ashely Lucio Henrieta

  19. Thank you for sharing your thoughts. I really appreciate your efforts and I am waiting for your next write ups thank you once again. Cinnamon Rab Margeaux

  20. wonderful issues altogether, you just received a new reader. Stephannie Kristoforo Hime

  21. Wonderful, what a webpage it is! This blog gives useful data to us, keep it up. Michele Vasilis Romano Sabra Car Onida

  22. Way cool! Some very valid points! I appreciate you writing this write-up plus the rest of the site is also very good. Jen Georgie Matthaus

  23. Good article. I certainly love this website. Stick with it! Betty Tabby Muldon

  24. Howdy, I do think your blog could possibly be having browser compatibility problems. Whenever I look at your blog in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick heads up! Aside from that, excellent blog! Robenia Donall Pizor

  25. Hey there. I found your site by means of Google while looking for a related subject, your site came up. It appears to be great. I have bookmarked it in my google bookmarks to visit then. Corilla Falkner Emmit

  26. Please bring the continuation of the nice posts, I will be glad if you approve the comment.

  27. thank you admin

  28. Thank you for this nice article, dating my site with comments please escort confirm and support

  29. Hello, thank you for this article, please confirm my comment to support me escort.

  30. Every weekend i used to pay a quick visit this web page, because i want enjoyment, since this this web page conations really pleasant funny material too.

  31. I follow your nice sharing site from time to time. please please me, escort I recommend you

  32. Takipçi satın almak sadece gelir elde etmek isteyen kişilerin değil hesaplarındaki takipçi sayısını
    yükselterek popüler bir profil oluşturmak isteyen kullanıcılarında
    tercih ettikleri bir yöntemdir
    . Instagram fenomeni olmak için İnstagram takipçi sayınızı megatakip adresi ile güvenilir sekilde
    takipci alabilirsiniz

  33. I wish to read more issues approximately it!

  34. Hey there, I think your blog might be having browser compatibility issues.
    When I look at your blog in Safari, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick
    heads up! Other then that, amazing blog!

  35. Outstanding post, you have pointed out some fantastic points, I too conceive this s a very fantastic website. Audy Deck Law

  36. Excellent blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  37. Hundreds of accommodation facilities in more than 50 countries provide their services through GuestService! Economic.

Speak Your Mind


Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.