From owner-freebsd-stable@FreeBSD.ORG Thu Jun 19 12:11:00 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF2AE37B401; Thu, 19 Jun 2003 12:10:59 -0700 (PDT) Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74A2C43F93; Thu, 19 Jun 2003 12:10:58 -0700 (PDT) (envelope-from joek@mail.flyingcroc.net) Received: from mail.flyingcroc.net (zircon.staff.flyingcroc.net [207.246.150.92])h5JJAvAv077068; Thu, 19 Jun 2003 12:10:58 -0700 (PDT) Message-ID: <3EF20AC1.10607@mail.flyingcroc.net> Date: Thu, 19 Jun 2003 12:10:57 -0700 From: Joe Kelsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030515 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gnome@freebsd.org, stable@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: flashpluginwrapper for Flash 6 (Shared Library Tools redux) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2003 19:11:00 -0000 Ok. I hand-modified the linux-flashplugin6 shared library to remove all of the DT_NEEDED entries. I then modified flashpluginwrapper to add the following functions: void __assert_fail(const char *assertion, const char *file, unsigned int line, const char *function) { fprint (stderr, "%s:%d:%s: %s\n", file, line, function, assertion); abort (); } #include int __ctype_toupper(int c) { return toupper (c); } unsigned short int __ctype_b[256]; #include int *__errno_location(void) { return __error (); } unsigned long int __strtoul_internal(const char *__nptr, char **__endptr, int __base, int __group) { return strtoul (__nptr, __endptr, __base); } void __terminate() { fprintf (stderr, "terminate!\n"); } ssize_t __write (int __fd, const void *__buf, size_t __size) { return write (__fd, __buf, __size); } int __fxstat(int __ver, int __filedesc, struct stat *__stat_buf) { return fstat (__filedesc, __stat_buf); } int __xstat(int __ver, const char *__filename, struct stat *__stat_buf) { return stat (__filename, __stat_buf); } I installed this new version of flashpluginwrapper, installed the linux-flashplugin6 library in browser_plugins. Now, the Flash 6 code segfaults in pthread_mutex_init(), called from Program received signal SIGSEGV, Segmentation fault. 0x284549d6 in pthread_mutex_init () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x284549d6 in pthread_mutex_init () from /usr/lib/libc_r.so.4 #1 0x298016b0 in MPCriticalSection::MPCriticalSection () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #2 0x297fdfd5 in PlatformGlobals::PlatformGlobals () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #3 0x2983c8de in NPP_GetValue () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #4 0x2983c91a in NPP_GetValue () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #5 0x2985ea55 in __pure_virtual () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #6 0x29761cbe in _init () from /usr/X11R6/lib/browser_plugins/libflashplayer.so #7 0x28081acf in find_symdef () from /usr/libexec/ld-elf.so.1 #8 0x280823ef in dlopen () from /usr/libexec/ld-elf.so.1 #9 0x28128c18 in PR_LoadLibrary () from /usr/X11R6/lib/mozilla/./libnspr4.so #10 0x28128b34 in PR_LoadLibraryWithFlags () ... Anyone familiar enough with Mozilla internals to understand why pthread_mutex_init segfaults? Has Mozilla started its own threads by the time it loads the libraries? I don't know where to look to track this down. Maybe a difference between Linux and FreeBSD in the pthread semantics? /Joe