all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bignum speedup patch causes crash at startup
@ 2018-09-04 14:21 Andy Moreton
  2018-09-04 15:10 ` Eli Zaretskii
  2018-09-04 16:40 ` Paul Eggert
  0 siblings, 2 replies; 23+ messages in thread
From: Andy Moreton @ 2018-09-04 14:21 UTC (permalink / raw)
  To: emacs-devel

Hi,

The recent changes in commit fe042e9d ("Speed up (+ 2 2) by a factor of
10") cause an immediate crash in 64bit emacs on Windows.

A patch that is this invasive should have been posted for comment and
review before it was committed. The patch contains both refactorings to
move code around and new code changes. It would have been better to
split this into more than one patch, to enable easier bisection of
problems.

Running master under GDB shows:

(gdb) run -Q
Starting program: C:\emacs\git\emacs\master\build\mingw64-x86_64\src\emacs.exe -Q
[New Thread 13388.0x29bc]
[New Thread 13388.0x24b4]
[New Thread 13388.0x2cd0]
[New Thread 13388.0x12e8]
[New Thread 13388.0x8f8]
[Thread 13388.0x2cd0 exited with code 0]
[New Thread 13388.0x36cc]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006acd4efb in ?? () from C:\msys64\mingw64\bin\libgmp-10.dll
(gdb) bt
#0  0x000000006acd4efb in ?? () from C:\msys64\mingw64\bin\libgmp-10.dll
#1  0x000000040018bcca in mpz_set_intmax (v=<optimized out>, result=<optimized out>) at C:/emacs/git/emacs/master/src/bignum.h:66
#2  bignum_integer (i=<optimized out>, tmp=<optimized out>) at C:/emacs/git/emacs/master/src/bignum.h:79
#3  rounding_driver (arg=make_number(2), divisor=<optimized out>, double_round=<optimized out>, int_divide=0x6acc9560, name=name@entry=0x40067f71f <callint_argfuns+3359> "ceiling") at C:/emacs/git/emacs/master/src/floatfns.c:362
#4  0x000000040018be79 in Fceiling (arg=<optimized out>, divisor=<optimized out>) at C:/emacs/git/emacs/master/src/floatfns.c:446
#5  0x0000000400186a35 in funcall_subr (subr=0x400653d20 <Sceiling>, numargs=numargs@entry=0x2, args=args@entry=0xbfcc00) at C:/emacs/git/emacs/master/src/eval.c:2899
#6  0x000000040018485e in Ffuncall (nargs=0x3, args=args@entry=0xbfcbf8) at C:/emacs/git/emacs/master/src/eval.c:2822
#7  0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(1028), nargs=nargs@entry=0x4, args=<optimized out>, args@entry=0xbfcfc0) at C:/emacs/git/emacs/master/src/bytecode.c:632
#8  0x00000004001882ce in funcall_lambda (fun=XIL(0x4002dd295), nargs=nargs@entry=0x4, arg_vector=arg_vector@entry=0xbfcfc0) at C:/emacs/git/emacs/master/src/lisp.h:1707
#9  0x000000040018495f in Ffuncall (nargs=0x5, args=args@entry=0xbfcfb8) at C:/emacs/git/emacs/master/src/eval.c:2824
#10 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(1024), nargs=nargs@entry=0x4, args=<optimized out>, args@entry=0xbfd200) at C:/emacs/git/emacs/master/src/bytecode.c:632
#11 0x00000004001882ce in funcall_lambda (fun=XIL(0x4002dd195), nargs=nargs@entry=0x4, arg_vector=arg_vector@entry=0xbfd200) at C:/emacs/git/emacs/master/src/lisp.h:1707
#12 0x000000040018495f in Ffuncall (nargs=0x5, args=args@entry=0xbfd1f8) at C:/emacs/git/emacs/master/src/eval.c:2824
#13 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(1024), nargs=nargs@entry=0x4, args=<optimized out>, args@entry=0xbfd438) at C:/emacs/git/emacs/master/src/bytecode.c:632
#14 0x00000004001882ce in funcall_lambda (fun=XIL(0x4002dd7c5), nargs=nargs@entry=0x4, arg_vector=arg_vector@entry=0xbfd438) at C:/emacs/git/emacs/master/src/lisp.h:1707
#15 0x000000040018495f in Ffuncall (nargs=nargs@entry=0x5, args=args@entry=0xbfd430) at C:/emacs/git/emacs/master/src/eval.c:2824
#16 0x00000004001895d5 in call4 (fn=<optimized out>, arg1=arg1@entry=XIL(0x4007800c5), arg2=arg2@entry=XIL(0xf228), arg3=arg3@entry=XIL(0xf228), arg4=arg4@entry=XIL(0xf228)) at C:/emacs/git/emacs/master/src/eval.c:2698
#17 0x000000040001031b in frame_windows_min_size (frame=frame@entry=XIL(0x4007800c5), horizontal=horizontal@entry=XIL(0xf228), ignore=XIL(0xf228), pixelwise=pixelwise@entry=XIL(0xf228)) at C:/emacs/git/emacs/master/src/lisp.h:932
#18 0x0000000400011373 in adjust_frame_size (f=0x4007800c0 <dumped_data+207104>, new_width=<optimized out>, new_height=<optimized out>, inhibit=inhibit@entry=0x5, pretend=0x0, parameter=parameter@entry=XIL(0x3f00)) at C:/emacs/git/emacs/master/src/lisp.h:932
#19 0x0000000400004b19 in change_frame_size_1 (f=<optimized out>, new_width=<optimized out>, new_height=<optimized out>, pretend=<optimized out>, delay=<optimized out>, safe=<optimized out>, pixelwise=<optimized out>) at C:/emacs/git/emacs/master/src/lisp.h:932
#20 0x000000040000ce6b in change_frame_size (f=0x400714c50 <mpz+16>, new_width=0x1, new_height=0x27ee60, pretend=0x60, pretend@entry=0x0, delay=delay@entry=0x0, safe=safe@entry=0x0, pixelwise=0x0) at C:/emacs/git/emacs/master/src/dispnew.c:5583
#21 0x000000040000cf83 in do_pending_window_change (safe=safe@entry=0x0) at C:/emacs/git/emacs/master/src/dispnew.c:5509
#22 0x0000000400017eb0 in x_set_font (f=0x400baea20 <dumped_data+4592224>, arg=XIL(0x518bea4), oldval=<optimized out>) at C:/emacs/git/emacs/master/src/frame.c:4341
#23 0x00000004000166b4 in x_set_frame_parameters (f=<optimized out>, f@entry=0x400baea20 <dumped_data+4592224>, alist=<optimized out>, alist@entry=XIL(0xbfd813)) at C:/emacs/git/emacs/master/src/lisp.h:1035
#24 0x00000004000199d5 in x_default_parameter (f=0x400baea20 <dumped_data+4592224>, alist=<optimized out>, prop=XIL(0x6ee8), deflt=XIL(0x400bb2a25), xprop=0x4006933d3 <illuminant_d65+5507> "font", xclass=0x4006933d8 <illuminant_d65+5512> "Font", type=RES_TYPE_STRING) at C:/emacs/git/emacs/master/src/frame.c:5090
#25 0x000000040020c412 in x_default_font_parameter (f=f@entry=0x400baea20 <dumped_data+4592224>, parms=parms@entry=XIL(0x400808873)) at C:/emacs/git/emacs/master/src/lisp.h:932
#26 0x0000000400216c6f in Fx_create_frame (parameters=XIL(0x400808873)) at C:/emacs/git/emacs/master/src/w32fns.c:5845
#27 0x0000000400186a29 in funcall_subr (subr=0x400659d40 <Sx_create_frame>, numargs=numargs@entry=0x1, args=args@entry=0xbfdb18) at C:/emacs/git/emacs/master/src/eval.c:2897
#28 0x000000040018485e in Ffuncall (nargs=0x2, args=args@entry=0xbfdb10) at C:/emacs/git/emacs/master/src/eval.c:2822
#29 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(256), nargs=nargs@entry=0x1, args=<optimized out>, args@entry=0xbfdda8) at C:/emacs/git/emacs/master/src/bytecode.c:632
#30 0x00000004001882ce in funcall_lambda (fun=XIL(0x40030acd5), nargs=nargs@entry=0x1, arg_vector=arg_vector@entry=0xbfdda8) at C:/emacs/git/emacs/master/src/lisp.h:1707
#31 0x000000040018495f in Ffuncall (nargs=0x2, args=args@entry=0xbfdda0) at C:/emacs/git/emacs/master/src/eval.c:2824
#32 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(257), nargs=nargs@entry=0x1, args=<optimized out>, args@entry=0xbfe148) at C:/emacs/git/emacs/master/src/bytecode.c:632
#33 0x00000004001882ce in funcall_lambda (fun=XIL(0x4009af115), nargs=nargs@entry=0x1, arg_vector=arg_vector@entry=0xbfe148) at C:/emacs/git/emacs/master/src/lisp.h:1707
#34 0x000000040018495f in Ffuncall (nargs=nargs@entry=0x2, args=args@entry=0xbfe140) at C:/emacs/git/emacs/master/src/eval.c:2824
#35 0x0000000400184cce in Fapply (nargs=0x2, args=0xbfe140) at C:/emacs/git/emacs/master/src/eval.c:2399
#36 0x00000004001869e0 in funcall_subr (subr=0x4006533e0 <Sapply>, numargs=numargs@entry=0x2, args=args@entry=0xbfe140) at C:/emacs/git/emacs/master/src/eval.c:2877
#37 0x000000040018485e in Ffuncall (nargs=0x3, args=args@entry=0xbfe138) at C:/emacs/git/emacs/master/src/eval.c:2822
#38 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(128), nargs=nargs@entry=0x1, args=<optimized out>, args@entry=0xbfe3e0) at C:/emacs/git/emacs/master/src/bytecode.c:632
#39 0x00000004001882ce in funcall_lambda (fun=XIL(0x400a3dc65), nargs=nargs@entry=0x1, arg_vector=arg_vector@entry=0xbfe3e0) at C:/emacs/git/emacs/master/src/lisp.h:1707
#40 0x000000040018495f in Ffuncall (nargs=0x2, args=args@entry=0xbfe3d8) at C:/emacs/git/emacs/master/src/eval.c:2824
#41 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(256), nargs=nargs@entry=0x1, args=<optimized out>, args@entry=0xbfe6e0) at C:/emacs/git/emacs/master/src/bytecode.c:632
#42 0x00000004001882ce in funcall_lambda (fun=XIL(0x400399b25), nargs=nargs@entry=0x1, arg_vector=arg_vector@entry=0xbfe6e0) at C:/emacs/git/emacs/master/src/lisp.h:1707
#43 0x000000040018495f in Ffuncall (nargs=0x2, args=args@entry=0xbfe6d8) at C:/emacs/git/emacs/master/src/eval.c:2824
#44 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(0), nargs=nargs@entry=0x0, args=<optimized out>, args@entry=0xbfe930) at C:/emacs/git/emacs/master/src/bytecode.c:632
#45 0x00000004001882ce in funcall_lambda (fun=XIL(0x400398f55), nargs=nargs@entry=0x0, arg_vector=arg_vector@entry=0xbfe930) at C:/emacs/git/emacs/master/src/lisp.h:1707
#46 0x000000040018495f in Ffuncall (nargs=0x1, args=args@entry=0xbfe928) at C:/emacs/git/emacs/master/src/eval.c:2824
#47 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(0), nargs=nargs@entry=0x0, args=<optimized out>, args@entry=0xbff1c8) at C:/emacs/git/emacs/master/src/bytecode.c:632
#48 0x00000004001882ce in funcall_lambda (fun=XIL(0x4003a21f5), nargs=nargs@entry=0x0, arg_vector=arg_vector@entry=0xbff1c8) at C:/emacs/git/emacs/master/src/lisp.h:1707
#49 0x000000040018495f in Ffuncall (nargs=0x1, args=args@entry=0xbff1c0) at C:/emacs/git/emacs/master/src/eval.c:2824
#50 0x00000004001ce74e in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=make_number(0), nargs=nargs@entry=0x0, args=<optimized out>, args@entry=0xbff550) at C:/emacs/git/emacs/master/src/bytecode.c:632
#51 0x00000004001882ce in funcall_lambda (fun=XIL(0x4003a11a5), fun@entry=XIL(0), nargs=nargs@entry=0x0, arg_vector=arg_vector@entry=0xbff550) at C:/emacs/git/emacs/master/src/lisp.h:1707
#52 0x000000040018756c in apply_lambda (fun=XIL(0), fun@entry=XIL(0x4003a11a5), args=<optimized out>, count=count@entry=0x4) at C:/emacs/git/emacs/master/src/eval.c:2959
#53 0x0000000400187dbf in eval_sub (form=form@entry=XIL(0x400909363)) at C:/emacs/git/emacs/master/src/eval.c:2332
#54 0x000000040018a4ed in Feval (form=XIL(0x400909363), lexical=lexical@entry=XIL(0)) at C:/emacs/git/emacs/master/src/eval.c:2107
#55 0x00000004000f01d8 in top_level_2 () at C:/emacs/git/emacs/master/src/lisp.h:932
#56 0x00000004001836b6 in internal_condition_case (bfun=bfun@entry=0x4000f01bc <top_level_2>, handlers=handlers@entry=XIL(0x5ef0), hfun=hfun@entry=0x4000f59e0 <cmd_error>) at C:/emacs/git/emacs/master/src/eval.c:1349
#57 0x00000004000f2814 in top_level_1 (ignore=<optimized out>) at C:/emacs/git/emacs/master/src/lisp.h:932
#58 0x00000004001835ee in internal_catch (tag=<optimized out>, func=func@entry=0x4000f27c8 <top_level_1>, arg=arg@entry=XIL(0)) at C:/emacs/git/emacs/master/src/eval.c:1114
#59 0x00000004000f4e55 in command_loop () at C:/emacs/git/emacs/master/src/lisp.h:932
#60 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Lisp Backtrace:
"ceiling" (0xbfcc00)
"window--min-size-1" (0xbfcfc0)
"window-min-size" (0xbfd200)
"frame-windows-min-size" (0xbfd438)
"x-create-frame" (0xbfdb18)
"x-create-frame-with-faces" (0xbfdda8)
0x9af110 PVEC_COMPILED
"apply" (0xbfe140)
"frame-creation-function" (0xbfe3e0)
"make-frame" (0xbfe6e0)
"frame-initialize" (0xbfe930)
"command-line" (0xbff1c8)
"normal-top-level" (0xbff550)




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

end of thread, other threads:[~2018-09-05 16:06 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-04 14:21 Bignum speedup patch causes crash at startup Andy Moreton
2018-09-04 15:10 ` Eli Zaretskii
2018-09-04 16:24   ` Eli Zaretskii
2018-09-04 18:59     ` Paul Eggert
2018-09-05  2:35       ` Eli Zaretskii
2018-09-05  7:31         ` Paul Eggert
2018-09-04 16:40 ` Paul Eggert
2018-09-04 17:30   ` Eli Zaretskii
2018-09-04 17:37   ` Andy Moreton
2018-09-04 17:50     ` Eli Zaretskii
2018-09-04 19:50       ` Andy Moreton
2018-09-04 21:11         ` Paul Eggert
2018-09-04 22:34           ` Tom Tromey
2018-09-05  0:09             ` Andy Moreton
2018-09-05  0:56               ` Paul Eggert
2018-09-05 15:21                 ` Eli Zaretskii
2018-09-05 15:17         ` Eli Zaretskii
2018-09-04 19:56     ` Andy Moreton
2018-09-04 20:48       ` Paul Eggert
2018-09-05 15:15         ` Eli Zaretskii
2018-09-05 15:40           ` Paul Eggert
2018-09-05 15:50             ` Pip Cet
2018-09-05 16:06               ` Paul Eggert

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.