unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
@ 2013-06-10  7:42 Bob Halley
  2013-06-13 17:14 ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Bob Halley @ 2013-06-10  7:42 UTC (permalink / raw)
  To: 14587

Since the recent CEDET merge, Emacs no longer builds for me.  It segfaults
while compiling cedet/srecode/texi.el.  The fault happens on optimized builds
with both gcc 4.2.1 and clang from the most recent Xcode (4.6.2) OS X.

If I checkout something just before the sequence of CEDET merges that ended
with

commit 8a705018438ec0142e964a48f1af4996242e20f6
Merge: 509f7cc 5419570
Author: David Engster <dengste@eml.cc>
Date:   Sun Jun 2 18:39:32 2013 +0200

    Merge with CEDET upstream (rev. 8564).

everything builds fine.  Any version at or after the version above fails.

Details:

(x86_64-apple-darwin12.4.0, NS apple-appkit-1187.39)
 of 2013-06-02 on bark.local
Windowing system distributor `Apple', version 10.3.1187
Configured using:
 `configure --without-x --with-ns -with-wide-int'

$ make bootstrap

[...all is good until...]

In end of data:
cedet/srecode/table.el:291:1:Warning: the function `srecode-mode-table' is not
    known to be defined.
Wrote /Users/halley/src/emacs/lisp/cedet/srecode/table.elc
Compiling cedet/srecode/template.el
Wrote /Users/halley/src/emacs/lisp/cedet/srecode/template.elc
Compiling cedet/srecode/texi.el
make[3]: *** [cedet/srecode/texi.elc] Abort trap: 6 (core dumped)
make[2]: *** [compile-main] Error 2
make[1]: *** [lisp] Error 2
make: *** [bootstrap] Error 2

(gdb) bt
#0  0x00007fff8da5dd46 in __kill ()
#1  0x000000010009f379 in terminate_due_to_signal (sig=6, backtrace_limit=40) at emacs.c:343
#2  0x00000001000bb193 in emacs_abort () at sysdep.c:2148
#3  0x000000010018ab9d in ns_term_shutdown (sig=<value temporarily unavailable, due to optimizations>) at nsterm.m:4388
#4  0x000000010009f9de in shut_down_emacs (sig=11, stuff=76230) at emacs.c:1944
#5  0x000000010009f33b in terminate_due_to_signal (sig=11, backtrace_limit=40) at emacs.c:327
#6  0x00000001000bb706 in deliver_fatal_thread_signal (sig=<value temporarily unavailable, due to optimizations>) at sysdep.c:1649
#7  <signal handler called>
#8  0x00007fff8a503a47 in memmove$VARIANT$sse42 ()
#9  0x00000001000db059 in directory_files_internal (directory=140734799730000, full=140734799730000, match=140734799730000, nosort=140734799730000, id_format=140734799730000, attrs=false) at dired.c:275
#10 0x0000000100117015 in Ffuncall (nargs=4421888592, args=0x1001171c8) at eval.c:2722
#11 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799730304, maxdepth=64, args_template=4296346960, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#12 0x000000010011a702 in funcall_lambda (fun=140734799730400, nargs=1, arg_vector=0x7fff5fbed6e0) at eval.c:2945
#13 0x00000001001170db in Ffuncall (nargs=4, args=0x1078f37b2) at eval.c:2760
#14 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799730640, maxdepth=32, args_template=4320145466, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#15 0x000000010011a702 in funcall_lambda (fun=140734799730736, nargs=2, arg_vector=0x7fff5fbed830) at eval.c:2945
#16 0x00000001001170db in Ffuncall (nargs=2, args=0x1078f3a02) at eval.c:2760
#17 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799730992, maxdepth=48, args_template=4300205426, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#18 0x000000010011a702 in funcall_lambda (fun=140734799731088, nargs=2, arg_vector=0x7fff5fbed990) at eval.c:2945
#19 0x00000001001170db in Ffuncall (nargs=3, args=0x103810afa) at eval.c:2760
#20 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799731344, maxdepth=48, args_template=4296336030, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#21 0x000000010011a702 in funcall_lambda (fun=140734799731440, nargs=9, arg_vector=0x7fff5fbedaf0) at eval.c:2945
#22 0x00000001001170db in Ffuncall (nargs=3, args=0x103810c1a) at eval.c:2760
#23 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799731744, maxdepth=96, args_template=4320145466, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#24 0x0000000100119f02 in eval_sub (form=10) at eval.c:2087
#25 0x000000010013d0ae in readevalloop (readcharfun=4320273946, stream=0x7fff5fbedd80, sourcename=4421888592, unibyte=140734799732096, readfun=140734799732096, start=4320145466, end=4320145466, printflag=false) at lread.c:1873
#26 0x0000000100138bbb in Fload (file=4421888592, noerror=140734799732528, nomessage=140734799732528, nosuffix=140735226364520, must_suffix=140734799732528) at lread.c:1351
#27 0x0000000100121683 in Frequire (feature=10, filename=140734799732608, noerror=140734799732608) at fns.c:2659
#28 0x0000000100116ff9 in Ffuncall (nargs=10, args=0x1001171c8) at eval.c:2718
#29 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799732880, maxdepth=32, args_template=4320145466, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#30 0x0000000100119f02 in eval_sub (form=2) at eval.c:2087
#31 0x000000010013d0ae in readevalloop (readcharfun=4320273946, stream=0x7fff5fbee1f0, sourcename=4421888592, unibyte=140734799733232, readfun=140734799733232, start=4320145466, end=4320145466, printflag=false) at lread.c:1873
#32 0x0000000100138bbb in Fload (file=4421888592, noerror=140734799733664, nomessage=140734799733664, nosuffix=140735226364368, must_suffix=140734799733664) at lread.c:1351
#33 0x0000000100121683 in Frequire (feature=2, filename=140734799733744, noerror=140734799733744) at fns.c:2659
#34 0x0000000100116ff9 in Ffuncall (nargs=2, args=0x1001171c8) at eval.c:2718
#35 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799734064, maxdepth=80, args_template=4320145466, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#36 0x0000000100119f02 in eval_sub (form=2) at eval.c:2087
#37 0x000000010013d0ae in readevalloop (readcharfun=4320273946, stream=0x7fff5fbee690, sourcename=4421888592, unibyte=140734799734416, readfun=140734799734416, start=4320145466, end=4320145466, printflag=false) at lread.c:1873
#38 0x0000000100138bbb in Fload (file=4421888592, noerror=140734799734848, nomessage=140734799734848, nosuffix=140735226364216, must_suffix=140734799734848) at lread.c:1351
#39 0x0000000100121683 in Frequire (feature=2, filename=140734799734928, noerror=140734799734928) at fns.c:2659
#40 0x0000000100116ff9 in Ffuncall (nargs=2, args=0x1001171c8) at eval.c:2718
#41 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799735216, maxdepth=48, args_template=4320145466, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#42 0x0000000100119f02 in eval_sub (form=2) at eval.c:2087
#43 0x000000010013d0ae in readevalloop (readcharfun=4320273946, stream=0x7fff5fbeeb10, sourcename=4421888592, unibyte=140734799735568, readfun=140734799735568, start=4320145466, end=4320145466, printflag=false) at lread.c:1873
#44 0x0000000100138bbb in Fload (file=4421888592, noerror=140734799736000, nomessage=140734799736000, nosuffix=140735226364064, must_suffix=140734799736000) at lread.c:1351
#45 0x0000000100121683 in Frequire (feature=2, filename=140734799736080, noerror=140734799736080) at fns.c:2659
#46 0x0000000100116ff9 in Ffuncall (nargs=2, args=0x1001171c8) at eval.c:2718
#47 0x0000000100116902 in Fapply (nargs=140734799736288, args=0x7fff5fbeede0) at eval.c:2193
#48 0x00000001001170f4 in Ffuncall (nargs=2, args=0x101823c3a) at eval.c:2692
#49 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799736560, maxdepth=0, args_template=1028, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#50 0x00000001001170db in Ffuncall (nargs=3, args=0x107800302) at eval.c:2760
#51 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799736816, maxdepth=0, args_template=4296337008, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#52 0x00000001001170db in Ffuncall (nargs=2, args=0x107800182) at eval.c:2760
#53 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799737072, maxdepth=0, args_template=1028, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#54 0x00000001001170db in Ffuncall (nargs=2, args=0x106808502) at eval.c:2760
#55 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799737328, maxdepth=0, args_template=4412492569, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#56 0x00000001001170db in Ffuncall (nargs=2, args=0x10480b655) at eval.c:2760
#57 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799737552, maxdepth=0, args_template=0, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#58 0x00000001001170db in Ffuncall (nargs=1, args=0x10480b685) at eval.c:2760
#59 0x0000000100119dac in eval_sub (form=1) at eval.c:2053
#60 0x000000010011aae8 in internal_lisp_condition_case (var=4404053442, bodyform=4370781654, handlers=4370780934) at eval.c:1169
#61 0x000000010014f351 in exec_byte_code (bytestr=4421888592, vector=140734799738416, maxdepth=0, args_template=140734799738216, nargs=4300792576, args=0x100512ce0) at bytecode.c:1099
#62 0x00000001001170db in Ffuncall (nargs=4404053442, args=0x1068083b2) at eval.c:2760
#63 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799738768, maxdepth=0, args_template=4412492249, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#64 0x00000001001170db in Ffuncall (nargs=2, args=0x10481b89a) at eval.c:2760
#65 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799739008, maxdepth=0, args_template=0, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#66 0x00000001001170db in Ffuncall (nargs=2, args=0x10480b455) at eval.c:2760
#67 0x0000000100119dac in eval_sub (form=1) at eval.c:2053
#68 0x000000010011aae8 in internal_lisp_condition_case (var=4420890962, bodyform=4370740918, handlers=4370742662) at eval.c:1169
#69 0x000000010014f351 in exec_byte_code (bytestr=4421888592, vector=140734799739840, maxdepth=0, args_template=140734799739664, nargs=4300792576, args=0x100512ce0) at bytecode.c:1099
#70 0x00000001001170db in Ffuncall (nargs=4420890962, args=0x107817122) at eval.c:2760
#71 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799740144, maxdepth=0, args_template=4420892990, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#72 0x00000001001170db in Ffuncall (nargs=2, args=0x10481b95a) at eval.c:2760
#73 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799740544, maxdepth=0, args_template=4300021952, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#74 0x00000001001170db in Ffuncall (nargs=1, args=0x1058172aa) at eval.c:2760
#75 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799740896, maxdepth=0, args_template=4300033222, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#76 0x00000001001170db in Ffuncall (nargs=2, args=0x10480ebba) at eval.c:2760
#77 0x000000010014e748 in exec_byte_code (bytestr=4421888592, vector=140734799741184, maxdepth=0, args_template=4300034625, nargs=4300792576, args=0x100512ce0) at bytecode.c:903
#78 0x000000010011a2bf in apply_lambda (fun=140734799741280, args=0) at eval.c:2820
#79 0x0000000100119fe9 in eval_sub (form=4297609293) at eval.c:2126
#80 0x000000010011685a in Feval (form=4320406470, lexical=4297609373) at eval.c:1918
#81 0x0000000100118c8b in internal_condition_case (bfun=0x1000a8ad0 <top_level_2>, handlers=4320211610, hfun=0x1000b2e40 <cmd_error>) at eval.c:1214
#82 0x00000001000b304b in top_level_1 (ignore=4297609293) at keyboard.c:1181
#83 0x0000000100118d77 in internal_catch (tag=4297609293, func=0x1000b3010 <top_level_1>, arg=4297609293) at eval.c:988
#84 0x00000001000b33b2 in command_loop [inlined] () at /Users/halley/src/emacs/src/keyboard.c:1142
#85 0x00000001000b33b2 in recursive_edit_1 () at keyboard.c:776
#86 0x00000001000a494d in Frecursive_edit () at keyboard.c:840
#87 0x00000001000a1835 in main (argc=5825280, argv=0x7fff5fbf0650) at emacs.c:1543
(gdb) f 9
#9  0x00000001000db059 in directory_files_internal (directory=140734799730000, full=140734799730000, match=140734799730000, nosort=140734799730000, id_format=140734799730000, attrs=false) at dired.c:275
275		      memcpy (SDATA (fullname), SDATA (directory),
(gdb) list
270		      Lisp_Object fullname;
271		      ptrdiff_t nbytes = len + directory_nbytes + needsep;
272		      ptrdiff_t nchars;
273	
274		      fullname = make_uninit_multibyte_string (nbytes, nbytes);
275		      memcpy (SDATA (fullname), SDATA (directory),
276			      directory_nbytes);
277	
278		      if (needsep)
279			SSET (fullname, directory_nbytes, DIRECTORY_SEP);

I don't know how to debug this, but if you tell me what you need I can
try to do it!

/Bob






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-10  7:42 bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap" Bob Halley
@ 2013-06-13 17:14 ` Paul Eggert
  2013-06-13 17:36   ` Bob Halley
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2013-06-13 17:14 UTC (permalink / raw)
  To: Bob Halley, 14587

What happens if you build with debugging enabled?
It might help to turn off optimization, so that you
can debug the thing.  Something like this, maybe?

./configure --without-x --with-ns --enable-checking CFLAGS='-g3 -O0'





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-13 17:14 ` Paul Eggert
@ 2013-06-13 17:36   ` Bob Halley
  2013-06-13 17:42     ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Bob Halley @ 2013-06-13 17:36 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14587


On Jun 13, 2013, at 6:14 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> What happens if you build with debugging enabled?
> It might help to turn off optimization, so that you
> can debug the thing.  Something like this, maybe?
> 
> ./configure --without-x --with-ns --enable-checking CFLAGS='-g3 -O0'

I tried that, and unfortunately the problem does not occur when compiled -O0.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-13 17:36   ` Bob Halley
@ 2013-06-13 17:42     ` Paul Eggert
  2013-06-14  9:44       ` Bob Halley
  2013-06-14 12:21       ` Bob Halley
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Eggert @ 2013-06-13 17:42 UTC (permalink / raw)
  To: Bob Halley; +Cc: 14587

On 06/13/13 10:36, Bob Halley wrote:
> I tried that, and unfortunately the problem does not occur when compiled -O0.

How about configure with --enable-checking -- do you
still get the same symptoms, or (hope, hope) do you get
an assertion failure?  Also, for better debugging you might
try CFLAGS='-g3 -O2 -fno-crossjumping' instead of plain -O2.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-13 17:42     ` Paul Eggert
@ 2013-06-14  9:44       ` Bob Halley
  2013-06-14 15:49         ` Paul Eggert
  2013-06-14 12:21       ` Bob Halley
  1 sibling, 1 reply; 9+ messages in thread
From: Bob Halley @ 2013-06-14  9:44 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14587


On Jun 13, 2013, at 6:42 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 06/13/13 10:36, Bob Halley wrote:
>> I tried that, and unfortunately the problem does not occur when compiled -O0.
> 
> How about configure with --enable-checking -- do you
> still get the same symptoms, or (hope, hope) do you get
> an assertion failure?  Also, for better debugging you might
> try CFLAGS='-g3 -O2 -fno-crossjumping' instead of plain -O2.

I did this, but the problem did not occur.  Getting suspicious, I tried a build on head with exactly the configuration that was failing for me before, and it no longer fails.  But, if I check out the tag after the cedet integration that I mentioned in my bug report, it still does fail.  So, something changed between the time I reported the bug and head that either fixes the problem or obscures it again :)

If you want to declare victory, that's OK with me, but I'm a little curious still so I'll try doing a build with the configuration you suggested against a version that fails. I will report if anything interesting happens.

/Bob






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-13 17:42     ` Paul Eggert
  2013-06-14  9:44       ` Bob Halley
@ 2013-06-14 12:21       ` Bob Halley
  1 sibling, 0 replies; 9+ messages in thread
From: Bob Halley @ 2013-06-14 12:21 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14587

I tried compiling the broken version with --enable-checking and CFLAGS='-g3 -O2 -fno-crossjumping'.  It segfaulted in the same place and was still not easily debuggable due to optimization.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-14  9:44       ` Bob Halley
@ 2013-06-14 15:49         ` Paul Eggert
  2013-06-14 16:03           ` Bob Halley
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2013-06-14 15:49 UTC (permalink / raw)
  To: Bob Halley; +Cc: 14587

On 06/14/2013 02:44 AM, Bob Halley wrote:
> If you want to declare victory, that's OK with me

Certainly the GNUstep port has seen changes since then.
I'm mildly inclined to declare victory, since it works for you now.
We can always reopen the bug if it comes back.  But if you'd
like to debug the broken version, I suggest compiling with
-fno-omit-frame-pointer as well, like this:

./configure --without-x --with-ns --enable-checking CFLAGS='-g3 -O2 -fno-crossjumping -fno-omit-frame-pointer'





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-14 15:49         ` Paul Eggert
@ 2013-06-14 16:03           ` Bob Halley
  2013-06-14 17:08             ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Bob Halley @ 2013-06-14 16:03 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14587


On Jun 14, 2013, at 4:49 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 06/14/2013 02:44 AM, Bob Halley wrote:
>> If you want to declare victory, that's OK with me
> 
> Certainly the GNUstep port has seen changes since then.
> I'm mildly inclined to declare victory, since it works for you now.

I vote for closing the bug.  I rebuild from head every few days, so if anything crops up again I'll investigate further and reopen the bug.

Thanks,

/Bob






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap"
  2013-06-14 16:03           ` Bob Halley
@ 2013-06-14 17:08             ` Paul Eggert
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Eggert @ 2013-06-14 17:08 UTC (permalink / raw)
  To: Bob Halley; +Cc: 14587-done

On 06/14/2013 09:03 AM, Bob Halley wrote:
 
> I vote for closing the bug.

Thanks, done.






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-14 17:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10  7:42 bug#14587: Segfault compiling cedet/srecode/texi.el during "make bootstrap" Bob Halley
2013-06-13 17:14 ` Paul Eggert
2013-06-13 17:36   ` Bob Halley
2013-06-13 17:42     ` Paul Eggert
2013-06-14  9:44       ` Bob Halley
2013-06-14 15:49         ` Paul Eggert
2013-06-14 16:03           ` Bob Halley
2013-06-14 17:08             ` Paul Eggert
2013-06-14 12:21       ` Bob Halley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).