From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29015 invoked by alias); 31 May 2010 06:53:19 -0000 Received: (qmail 28993 invoked by uid 48); 31 May 2010 06:53:18 -0000 Date: Mon, 31 May 2010 06:53:00 -0000 From: "pizhoupeter at hotmail dot com" To: gdb-prs@sourceware.org Message-ID: <20100531065318.11646.pizhoupeter@hotmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug cli/11646] New: which a shared library is opened and closed X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00326.txt.bz2 gdb version: 7.1, OS: Red Hat Enterprise Linux Client release 5.3 (Tikanga) Reproduce steps: 1. build a shared library: source code (file shared.c): int add(int a, int b) { return a+b; } gcc -m32 -fpic -shared shared.c -o libmyshared.so 2. build an executable source code (main.c) #include #include void openlibrary() { void *handle = dlopen("./libmyshared.so", RTLD_LAZY); if(handle!=NULL) { printf("open successully\n"); dclose(handle); } else { fprintf(stderr, "%s\n", dlerror()); } } int main() { return 0; } gcc -m32 -g main.c -ldl 3. launch the debugger by command "gdb a.out" then in the command line interface: 1) input "b main", then type enter 2) input "run", then type enter 3) input "c openlibrary()", then type enter 4) repeat step 3 at most 50 times, then the gdb terminates. This behavior is unexpected. Note: this bug doesn't exist in 6.8-27.el5 -- Summary: which a shared library is opened and closed Product: gdb Version: 7.1 Status: UNCONFIRMED Severity: normal Priority: P1 Component: cli AssignedTo: unassigned at sourceware dot org ReportedBy: pizhoupeter at hotmail dot com CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=11646 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.