From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: When should ralloc.c be used? (WAS: bug#24358) Date: Tue, 25 Oct 2016 19:00:45 -0400 Message-ID: <20161025190045.1b1d9e86@jabberwock.cb.piermont.com> References: <87twe6sx2g.fsf@users.sourceforge.net> <87eg51ng4r.fsf_-_@users.sourceforge.net> <87k2djwumn.fsf@users.sourceforge.net> <83h98nidvd.fsf@gnu.org> <87eg3rvtsf.fsf@users.sourceforge.net> <83k2dihpm9.fsf@gnu.org> <8760p2wzgj.fsf@users.sourceforge.net> <838ttyhhzu.fsf@gnu.org> <871szqwu51.fsf@users.sourceforge.net> <831szqhbc2.fsf@gnu.org> <87d1itt79z.fsf_-_@users.sourceforge.net> <7baa18d4-2b09-caa8-005e-29008a383ad1@cs.ucla.edu> <83mvhwrgd5.fsf@gnu.org> <8539f38f-9a11-44c3-4de7-bb974c96206c@cs.ucla.edu> <83d1iq5ib1.fsf@gnu.org> <83r3753c8j.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1477436524 14007 195.159.176.226 (25 Oct 2016 23:02:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2016 23:02:04 +0000 (UTC) Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org, rms@gnu.org, npostavs@users.sourceforge.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 26 01:02:00 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzAiy-0000dX-14 for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2016 01:01:40 +0200 Original-Received: from localhost ([::1]:58629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzAj0-0005Dq-Fw for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2016 19:01:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzAiB-0005Cl-3e for emacs-devel@gnu.org; Tue, 25 Oct 2016 19:00:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzAiA-00071H-AC for emacs-devel@gnu.org; Tue, 25 Oct 2016 19:00:51 -0400 Original-Received: from hacklheber.piermont.com ([166.84.7.14]:52722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzAi6-00070N-6e; Tue, 25 Oct 2016 19:00:46 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id B2628E91; Tue, 25 Oct 2016 19:00:45 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id 7BFFD2DE021; Tue, 25 Oct 2016 19:00:45 -0400 (EDT) In-Reply-To: <83r3753c8j.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 166.84.7.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208810 Archived-At: On Mon, 24 Oct 2016 20:09:32 +0300 Eli Zaretskii wrote: > > > It imposes hard-to-fulfill requirements on functions that get > > > C pointers to buffer text or to Lisp string data: those > > > functions must never call malloc, directly or indirectly. > > > > I think the way to fix those is by systematically looking at the > > source for them, rather than by debugging. > > Yes, but finding out whether this is so is not easy, because the > malloc call is sometimes buried very deep. Could this be found by doing a debugging build where malloc aborts in the conditions where it can't be called directly or indirectly? Then one could just run that way and find the instances pretty easily. Perry -- Perry E. Metzger perry@piermont.com