From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Error with -O3 but not -O2: "Wrong type argument: listp". Date: Sun, 29 Jan 2006 19:57:33 -0500 Message-ID: References: <7wy810kq79.fsf@ece.lsu.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1138583491 5175 80.91.229.2 (30 Jan 2006 01:11:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2006 01:11:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 02:11:29 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F3NZf-0003vA-Nj for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2006 02:11:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3Ncb-00039t-6X for ged-emacs-devel@m.gmane.org; Sun, 29 Jan 2006 20:14:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F3NQ2-0005nI-Br for emacs-devel@gnu.org; Sun, 29 Jan 2006 20:01:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F3NPz-0005mG-Ez for emacs-devel@gnu.org; Sun, 29 Jan 2006 20:01:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3NPy-0005mA-Ud for emacs-devel@gnu.org; Sun, 29 Jan 2006 20:01:19 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F3NOC-0006ZV-AB for emacs-devel@gnu.org; Sun, 29 Jan 2006 19:59:28 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1F3NML-0000R2-IC; Sun, 29 Jan 2006 19:57:33 -0500 Original-To: David Koppelman In-reply-to: <7wy810kq79.fsf@ece.lsu.edu> (message from David Koppelman on Sat, 28 Jan 2006 15:17:14 -0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49728 Archived-At: I've encountered errors in temacs, the same one described by Clemens Schueller, when make bootstrap is run with "-O3" optimization; -O0, -O1, and -O2 work fine. The errors vary with build options but they all start with "Wrong type argument: listp": Wrong type argument: listp, -134393892 Wrong type argument: listp, 0 Wrong type argument: listp, [-134218836 [-134218836 #0 gmake[2]: *** [bootstrap-emacs] Segmentation fault Wrong type argument: listp, [] The first step is to run under GDB with a breakpoint at Fsignal and see where the error is signaled. Then just keep debugging, tracing things back till you see what caused the behavior. What makes this hard is that the bug may not be in the Emacs sources. It could be that some code was miscompiled. I can try compiling at -O2 and try out one of the -O3 optimizations at a time, if that would help. As evidence, it is unlikely to prove anything. There's no chance anyone could guess which code is miscompiled just by knowing which optimization did it. You will still need to find the miscompiled line by debugging. The only way that this is likely to help is if you can turn off some optimization that impedes understanding of the machine code. Having it out of the way would make the job easier.