From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 15:36:43 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D447116A4CE for ; Fri, 6 Feb 2004 15:36:43 -0800 (PST) Received: from mail.relia.net (mail.relia.net [207.173.156.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2B3E43D46 for ; Fri, 6 Feb 2004 15:36:42 -0800 (PST) (envelope-from joe@joe-lewis.com) Received: from customercare.relia.net ([207.173.156.19] helo=joe-lewis.com) by mail.relia.net (Exim 4.24 #1 (FreeBSD 4.7)) protocol: esmtp id 1ApFWb-000JDr-PY for ; Fri, 06 Feb 2004 16:36:41 -0700 Message-ID: <40242613.8090201@joe-lewis.com> Date: Fri, 06 Feb 2004 16:41:07 -0700 From: Joe Lewis User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: programming help - dlopen() segmentation fault X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 23:36:43 -0000 G'Day, ladies and gents; I've got a program that I am trying to play around with. Once I've added dlopen() using --export-dynamic, every time I try to run the program, I get a segmentation fault. It always occurs on the same line of code : modules = new_module_pointer; I can comment that line out, and suddenly the thing runs without a hitch. However, I kinda need that line. When I run gdb on the core dump, I get : GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... (no debugging symbols found)... Core was generated by `server'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done. Reading symbols from /home/j/joe/code/mail/source/modules/mail_mod_sample.so... (no debugging symbols found)...done. Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)... done. #0 0x280da8ba in __sfvwrite () from /usr/lib/libc.so.4 (gdb) Does anyone have any ideas? Joe