Date: Thu, 6 Feb 2003 18:45:20 +0100 (CET) From: Volker Stolz <stolz@fump.kawo2.rwth-aachen.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/48012: [patch] x11/xnee: fix sigbus on -current and sigsegv bug Message-ID: <200302061745.h16HjKTP001396@fump.kawo2.rwth-aachen.de>
next in thread | raw e-mail | index | archive | help
>Number: 48012 >Category: ports >Synopsis: [patch] x11/xnee: fix sigbus on -current and sigsegv bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 06 09:50:04 PST 2003 >Closed-Date: >Last-Modified: >Originator: Volker Stolz >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD fump.kawo2.rwth-aachen.de 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue Jan 21 01:31:48 CET 2003 alex@zerogravity.kawo2.rwth-aachen.de:/storage/FreeBSD/HEAD/obj/storage/FreeBSD/HEAD/src/sys/FUMP i386 >Description: Bento noticed that xnee dumps core on -current. Reason: malloc(). While running tests I noticed another segfault (-stable & -current) which looks like a real bug. >How-To-Repeat: >Fix: Add new patch file: --- src/lib/xnee.c.orig Sun Jan 12 22:08:39 2003 +++ src/lib/xnee.c Thu Feb 6 18:38:42 2003 @@ -502,6 +502,10 @@ int window; int screen; + if (xd->grab==NULL) + { + xd->grab = XOpenDisplay (NULL); + } screen = DefaultScreen (xd->grab); window = RootWindow(xd->grab, screen ); xnee_verbose (xd, "window %d\n", window); @@ -702,6 +706,7 @@ xnee_print_error ("Could not allocate memory ........\n"); exit (XNEE_MEMORY_FAULT); } + memset(xd, NULL, sizeof (xnee_data)); xd->xnee_info = (xnee_record_init_data*) malloc (sizeof (xnee_record_init_data)) ; xd->replay_setup = (xnee_testext_setup*) malloc (sizeof (xnee_testext_setup)) ; xd->record_setup = xnee_new_recordext_setup(); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302061745.h16HjKTP001396>