From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Mattner Newsgroups: gmane.emacs.devel Subject: Re: C-g crash in C-x C-f (OSX Lion) Date: Fri, 16 Dec 2011 22:22:54 +0100 Message-ID: References: <4EEB48B2.9090602@swipnet.se> <83liqc1tac.fsf@gnu.org> <83fwgk1atk.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324070586 28607 80.91.229.12 (16 Dec 2011 21:23:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2011 21:23:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 22:23:02 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RbfF8-0002ge-5C for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 22:23:02 +0100 Original-Received: from localhost ([::1]:45160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbfF7-0001WO-Kh for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 16:23:01 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbfF4-0001W8-Cn for emacs-devel@gnu.org; Fri, 16 Dec 2011 16:22:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbfF3-0001r1-92 for emacs-devel@gnu.org; Fri, 16 Dec 2011 16:22:58 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:46973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbfF1-0001qM-Bl; Fri, 16 Dec 2011 16:22:55 -0500 Original-Received: by iacb35 with SMTP id b35so3791802iac.0 for ; Fri, 16 Dec 2011 13:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=AdfW1CaL+wg8rPHSkfl8hscUoamA5W3NqEXXjQ96pPM=; b=rMSV4GMbLnTQF/bIye06vp5PpGfSESQGzsXTbK+ZctHwmwykvP/oBb/hNcA3dNbLSs 8Wdp80AI8UYb/qCkgKOeeLhk/3+cITaadh0jwdGgZw3NTE4/AIR1k7vnedakG14Tv1pB z8pWsIIeMH4mHzAhMwGEoQoZ5mho668KHAjF4= Original-Received: by 10.50.219.226 with SMTP id pr2mr633768igc.77.1324070574198; Fri, 16 Dec 2011 13:22:54 -0800 (PST) Original-Received: by 10.50.6.165 with HTTP; Fri, 16 Dec 2011 13:22:54 -0800 (PST) In-Reply-To: <83fwgk1atk.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146754 Archived-At: On Fri, Dec 16, 2011 at 10:11 PM, Eli Zaretskii wrote: >> Date: Fri, 16 Dec 2011 21:19:19 +0100 >> From: Carsten Mattner >> Cc: emacs-devel@gnu.org >> >> > #0 =A00x9adc5d50 in strlen () >> > #1 =A00x001e7601 in intern (str=3D0x0) at lread.c:3707 >> > #2 =A00x00283efb in ns_string_to_symbol (t=3D0x0) at nsselect.m:86 >> > #3 =A00x002847ab in ns_handle_selection_request (event=3D0xbfffef88) a= t >> > nsselect.m:247 >> > >> > vs the below with with the terminal frontend. >> > >> > Next I will not load evil-mode and see what happens. >> >> Can these crashes happen due to enabled assertions? > > No. =A0Emacs crashes because it tries to compute the length of a string > specified by a NULL pointer. =A0It looks like this happens due to a > selection request, but when that request is handled, Emacs tries to > intern a name that is a NULL string. What about the other crash which happened when I ran it as emacs -nw? > I don't know enough about the NS build and the code in nsselect.m to > reason why this could happen. =A0In particular, I don't understand this > portion of the code: > > =A0static void > =A0ns_handle_selection_request (struct input_event *event) > =A0{ > =A0 =A0// FIXME: BIG UGLY HACK!!! > =A0 =A0id pb =3D (id)*(EMACS_INT*)&(event->x); > =A0 =A0... > =A0 =A0selection_name =3D ns_string_to_symbol ([(NSPasteboard *)pb name])= ; > > How come the x coordinate of an event could be passed to > ns_string_to_symbol as a string, no matter how it is type-cast?? > > This certainly isn't related to enabled assertions. I also didn't think so, but it's a foreign codebase and it's C, so better ask than assume.