From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: building with -flto -fwhole-program Date: Tue, 16 Nov 2010 14:42:20 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289936557 29883 80.91.229.12 (16 Nov 2010 19:42:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Nov 2010 19:42:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 16 20:42:33 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PIRQH-0000Du-8p for ged-emacs-devel@m.gmane.org; Tue, 16 Nov 2010 20:42:33 +0100 Original-Received: from localhost ([127.0.0.1]:51825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIRQG-0006Ch-HT for ged-emacs-devel@m.gmane.org; Tue, 16 Nov 2010 14:42:32 -0500 Original-Received: from [140.186.70.92] (port=46536 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIRQ9-0006BO-Ri for emacs-devel@gnu.org; Tue, 16 Nov 2010 14:42:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIRQ6-0004dC-Ae for emacs-devel@gnu.org; Tue, 16 Nov 2010 14:42:25 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:43144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIRQ6-0004d7-8z for emacs-devel@gnu.org; Tue, 16 Nov 2010 14:42:22 -0500 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PIRQ4-0008Rt-Lt for emacs-devel@gnu.org; Tue, 16 Nov 2010 14:42:20 -0500 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:132748 Archived-At: Trying to build using the current gcc trunk using -flto -fwhole-program -O0 results in a binary that gives an error at run time: *** glibc detected *** /home/dann/emacs/objs/src/emacs: corrupted double-linked list: 0x086bed00 *** Breakpoint 3, 0x00447192 in backtrace () from /lib/libc.so.6 (gdb) bt #0 0x00447192 in backtrace () from /lib/libc.so.6 #1 0x003c8a61 in __libc_message () from /lib/libc.so.6 #2 0x003d18a1 in _int_realloc () from /lib/libc.so.6 #3 0x003d3605 in realloc () from /lib/libc.so.6 #4 0x080e5bf0 in xrealloc (block=0x86becf8, size=0x10) at /home/dann/emacs/emacs/src/alloc.c:752 #5 0x080ceddc in regex_compile (pattern=0x837a7b0 "/#[^/]+#\\'", size=0xa, syntax=0x340204, bufp=0x8391260) at /home/dann/emacs/emacs/src/regex.c:2907 #6 0x080cd7f2 in re_compile_pattern (pattern=0x837a7b0 "/#[^/]+#\\'", length=0xa, bufp=0x8391260) at /home/dann/emacs/emacs/src/regex.c:6413 #7 0x0804f85a in compile_pattern_1 (cp=0x8391250, pattern=0x8211dd1, translate=0x83d40aa, regp=0x838fa80, posix=0x0) at /home/dann/emacs/emacs/src/search.c:163 #8 0x0804f6b4 in compile_pattern (pattern=0x8211dd1, regp=0x838fa80, translate=0x83d40aa, posix=0x0, multibyte=0x0) at /home/dann/emacs/emacs/src/search.c:258 #9 0x0815d5c5 in string_match_1 (regexp=0x8211dd1, string=0x8431eb9, start=0x83d40aa, posix=0x0) at /home/dann/emacs/emacs/src/search.c:414 #10 0x0815d41e in Fstring_match (regexp=0x8211dd1, string=0x8431eb9, start=0x83d40aa) at /home/dann/emacs/emacs/src/search.c:464 #11 0x080e72f2 in Ffuncall (nargs=0x3, args=0xbffe88f0) at /home/dann/emacs/emacs/src/eval.c:2996 #12 0x081360c7 in Fbyte_code (bytestr=0x82120c9, vector=0x82120dd, maxdepth=0x10) at /home/dann/emacs/emacs/src/bytecode.c:679 #13 0x080e78df in funcall_lambda (fun=0x82120a5, nargs=0x1, arg_vector=0xbffe8ba4) at /home/dann/emacs/emacs/src/eval.c:3174 #14 0x080e74c7 in Ffuncall (nargs=0x2, args=0xbffe8ba0) at /home/dann/emacs/emacs/src/eval.c:3036 #15 0x081360c7 in Fbyte_code (bytestr=0x8212241, vector=0x8212255, maxdepth=0x18) at /home/dann/emacs/emacs/src/bytecode.c:679 #16 0x080e78df in funcall_lambda (fun=0x8212215, nargs=0x2, arg_vector=0xbffe8e64) at /home/dann/emacs/emacs/src/eval.c:3174 #17 0x080e74c7 in Ffuncall (nargs=0x3, args=0xbffe8e60) at /home/dann/emacs/emacs/src/eval.c:3036 #18 0x081360c7 in Fbyte_code (bytestr=0x82124b9, vector=0x82124cd, maxdepth=0x10) at /home/dann/emacs/emacs/src/bytecode.c:679 #19 0x080e78df in funcall_lambda (fun=0x821249d, nargs=0x2, arg_vector=0xbffe9124) at /home/dann/emacs/emacs/src/eval.c:3174 #20 0x080e74c7 in Ffuncall (nargs=0x3, args=0xbffe9120) at /home/dann/emacs/emacs/src/eval.c:3036 #21 0x080e6cee in call2 (fn=0x8438682, arg1=0x8431eb9, arg2=0x6dc) at /home/dann/emacs/emacs/src/eval.c:2804 #22 0x0806257d in Finsert_file_contents (filename=0x8431eb9, visit=0x83d40aa, beg=0x0, end=0x6dc, replace=0x83d40aa) at /home/dann/emacs/emacs/src/fileio.c:4089 #23 0x080e7365 in Ffuncall (nargs=0x2, args=0xbfffd660) at /home/dann/emacs/emacs/src/eval.c:3004 #24 0x081360c7 in Fbyte_code (bytestr=0x820f0a9, vector=0x820f0bd, maxdepth=0x18) at /home/dann/emacs/emacs/src/bytecode.c:679 #25 0x080e78df in funcall_lambda (fun=0x820f065, nargs=0x4, arg_vector=0xbfffd93c) at /home/dann/emacs/emacs/src/eval.c:3174 #26 0x080e74c7 in Ffuncall (nargs=0x5, args=0xbfffd938) at /home/dann/emacs/emacs/src/eval.c:3036 #27 0x080e6e4f in call4 (fn=0x8421502, arg1=0x8431f09, arg2=0x8431f09, arg3=0x83d40c2, arg4=0x83d40c2) at /home/dann/emacs/emacs/src/eval.c:2838 #28 0x080fa0ea in Fload (file=0x8431f19, noerror=0x83d40c2, nomessage=0x83d40c2, nosuffix=0x83d40c2, must_suffix=0x83d40aa) at /home/dann/emacs/emacs/src/lread.c:1177 #29 0x080e7365 in Ffuncall (nargs=0x5, args=0xbfffdbb0) at /home/dann/emacs/emacs/src/eval.c:3004 #30 0x081360c7 in Fbyte_code (bytestr=0x82367c1, vector=0x82367d5, maxdepth=0x18) at /home/dann/emacs/emacs/src/bytecode.c:679 #31 0x080e78df in funcall_lambda (fun=0x82367ad, nargs=0x0, arg_vector=0xbfffddd0) at /home/dann/emacs/emacs/src/eval.c:3174 #32 0x0813a03e in apply_lambda (fun=0x82367ad, args=0x83d40aa, eval_flag=0x1) at /home/dann/emacs/emacs/src/eval.c:3100 #33 0x08138c25 in Feval (form=0x8450236) at /home/dann/emacs/emacs/src/eval.c:2394 #34 0x0813543b in top_level_2 () at /home/dann/emacs/emacs/src/keyboard.c:1330 #35 0x0810a8a3 in internal_condition_case (bfun=0x8135428 , handlers=0x83db93a, hfun=0x805d8eb ) at /home/dann/emacs/emacs/src/eval.c:1460 #36 0x0805d8b9 in top_level_1 (ignore=0x83d40aa) at /home/dann/emacs/emacs/src/keyboard.c:1338 #37 0x0810a73a in internal_catch (tag=0x83db19a, func=0x805d887 , arg=0x83d40aa) at /home/dann/emacs/emacs/src/eval.c:1204 #38 0x080e8e15 in command_loop () at /home/dann/emacs/emacs/src/keyboard.c:1293 #39 0x080e8d54 in recursive_edit_1 () at /home/dann/emacs/emacs/src/keyboard.c:923 #40 0x08170110 in Frecursive_edit () at /home/dann/emacs/emacs/src/keyboard.c:985 #41 0x0805efb8 in main (argc=0x5, argv=0xbfffe644) at /home/dann/emacs/emacs/src/emacs.c:1722 Lisp Backtrace: "string-match" (0xbffe88f4) "auto-coding-alist-lookup" (0xbffe8ba4) "find-auto-coding" (0xbffe8e64) "set-auto-coding" (0xbffe9124) "insert-file-contents" (0xbfffd664) "load-with-code-conversion" (0xbfffd93c) "load" (0xbfffdbb4) "normal-top-level" (0xbfffddd0) This might be a bug in the compiler, or maybe something in emacs breaks when using -fwhole-program... Ideas how to go about this?