emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changed dlopen flags in dynlib.c, gccemacs crash


From: hx
Subject: Re: changed dlopen flags in dynlib.c, gccemacs crash
Date: Thu, 9 Dec 2021 08:51:03 +0800

remove the directory (28.0.90-xxx) from ~/.emacs.d/eln-cache/,
start emacs with -nw -q, it will crash after a few seconds without any operation.
after that, it will crash immediately when I start it with the same parameters.

here is the backtrace:

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
                                                             Fcomp__register_lambda (reloc_idx=0xa, c_name=0x555555e5c6f3, minarg=0x16, maxarg=0x16, type=0x0, rest=0x555555e76854, comp_u=0x555555e65ab5) at comp.c:5195
5195  Lisp_Object intspec = SECOND (rest);
(gdb) bt
#0  Fcomp__register_lambda (reloc_idx=0xa, c_name=0x555555e5c6f3, minarg=0x16, maxarg=0x16, type=0x0, rest=0x555555e76854, comp_u=0x555555e65ab5) at comp.c:5195
#1  0x00007fffef1605a7 in top_level_run () at /home/silent/.emacs.d/eln-cache/28.0.90-8dcada16/cconv-3b1f1f98-cca24f72.eln
#2  0x0000555555809d18 in load_comp_unit (comp_u=0x555555e65ab0, loading_dump=false, late_load=false) at comp.c:5093
#3  0x000055555580a830 in Fnative_elisp_load (filename=0x555555e51534, late_load=0x0) at comp.c:5316
#4  0x00005555557e1d36 in Fload (file=0x555555e081c4, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x30) at lread.c:1565
#5  0x00005555557e207e in save_match_data_load (file=0x555555e081c4, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x30) at lread.c:1629
#6  0x00005555557bdf33 in Frequire (feature=0x19b100, filename=0x0, noerror=0x0) at fns.c:3184
#7  0x00005555557af134 in funcall_subr (subr=0x555555c67ce0 <Srequire>, numargs=1, args=0x7fffffff85f0) at eval.c:3103
#8  0x00005555557aecde in Ffuncall (nargs=2, args=0x7fffffff85e8) at eval.c:3023
#9  0x00005555557fb3e2 in exec_byte_code (bytestr=0x555555e081e4, vector=0x555555dc9e05, maxdepth=0x22, args_template=0x0, nargs=0, args=0x0) at bytecode.c:632
#10 0x00005555557fa8de in Fbyte_code (bytestr=0x555555e081e4, vector=0x555555dc9e05, maxdepth=0x22) at bytecode.c:334
#11 0x00005555557ad73c in eval_sub (form=0x555555dcb8f3) at eval.c:2504
#12 0x00005555557e40d4 in readevalloop (readcharfun=0x7830, infile0=0x7fffffff8d30, sourcename=0x555555e07844, printflag=false, unibyte=0x0, readfun=0x0, start=0x0, end=0x0) at lread.c:2326
#13 0x00005555557e1df8 in Fload (file=0x7ffff01f0ae4, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x30) at lread.c:1579
#14 0x00005555557e207e in save_match_data_load (file=0x7ffff01f0ae4, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x30) at lread.c:1629
#15 0x00005555557acc82 in Fautoload_do_load (fundef=0x7ffff01f0ab3, funname=0x2aaa9a5158c0, macro_only=0x0) at eval.c:2295
#16 0x00005555557aee50 in Ffuncall (nargs=2, args=0x7fffffff8f98) at eval.c:3042
#17 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff05cf9ac, vector=0x7ffff01ebf3d, maxdepth=0x76, args_template=0x406, nargs=1, args=0x7fffffff95b8) at bytecode.c:632
#18 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff01ebf0d, syms_left=0x406, nargs=1, args=0x7fffffff95b0) at eval.c:3147
#19 0x00005555557af71a in funcall_lambda (fun=0x7ffff01ebf0d, nargs=1, arg_vector=0x7fffffff95b0) at eval.c:3228
#20 0x00005555557aed32 in Ffuncall (nargs=2, args=0x7fffffff95a8) at eval.c:3027
#21 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff05d1754, vector=0x7ffff01ebebd, maxdepth=0x26, args_template=0xc0e, nargs=3, args=0x7fffffff9ad0) at bytecode.c:632
#22 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff01ebe8d, syms_left=0xc0e, nargs=3, args=0x7fffffff9ab8) at eval.c:3147
#23 0x00005555557af71a in funcall_lambda (fun=0x7ffff01ebe8d, nargs=3, arg_vector=0x7fffffff9ab8) at eval.c:3228
#24 0x00005555557aed32 in Ffuncall (nargs=4, args=0x7fffffff9ab0) at eval.c:3027
#25 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff053bb64, vector=0x7ffff053bb1d, maxdepth=0x22, args_template=0x406, nargs=1, args=0x7fffffffa030) at bytecode.c:632
#26 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff053baed, syms_left=0x406, nargs=1, args=0x7fffffffa028) at eval.c:3147
#27 0x00005555557af71a in funcall_lambda (fun=0x7ffff053baed, nargs=1, arg_vector=0x7fffffffa028) at eval.c:3228
#28 0x00005555557aed32 in Ffuncall (nargs=2, args=0x7fffffffa020) at eval.c:3027
#29 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff05cef34, vector=0x7ffff01f47ed, maxdepth=0x66, args_template=0x1416, nargs=5, args=0x7fffffffa698) at bytecode.c:632
#30 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff01f47bd, syms_left=0x1416, nargs=5, args=0x7fffffffa670) at eval.c:3147
#31 0x00005555557af71a in funcall_lambda (fun=0x7ffff01f47bd, nargs=5, arg_vector=0x7fffffffa670) at eval.c:3228
#32 0x00005555557aed32 in Ffuncall (nargs=6, args=0x7fffffffa668) at eval.c:3027
#33 0x00005555557fb3e2 in exec_byte_code (bytestr=0x555555e76514, vector=0x555555e75485, maxdepth=0x1a, args_template=0x0, nargs=0, args=0x0) at bytecode.c:632
#34 0x00005555557fa8de in Fbyte_code (bytestr=0x555555e76514, vector=0x555555e75485, maxdepth=0x1a) at bytecode.c:334
#35 0x00005555557ad73c in eval_sub (form=0x555555e5af83) at eval.c:2504
#36 0x00005555557ace05 in Feval (form=0x555555e5af83, lexical=0x30) at eval.c:2327
#37 0x00007fffef176107 in top_level_run () at /home/silent/.emacs.d/eln-cache/28.0.90-8dcada16/xterm-6ea901d1-05e64e57.eln
#38 0x0000555555809d18 in load_comp_unit (comp_u=0x555555e43630, loading_dump=false, late_load=false) at comp.c:5093
#39 0x000055555580a830 in Fnative_elisp_load (filename=0x555555e55af4, late_load=0x0) at comp.c:5316
#40 0x00005555557e1d36 in Fload (file=0x555555e52124, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x0) at lread.c:1565
#41 0x00005555557e207e in save_match_data_load (file=0x555555e52124, noerror=0x0, nomessage=0x30, nosuffix=0x0, must_suffix=0x30) at lread.c:1629
#42 0x00005555557bdf33 in Frequire (feature=0x117670, filename=0x0, noerror=0x0) at fns.c:3184
#43 0x00005555557af134 in funcall_subr (subr=0x555555c67ce0 <Srequire>, numargs=1, args=0x7fffffffb1d0) at eval.c:3103
#44 0x00005555557aecde in Ffuncall (nargs=2, args=0x7fffffffb1c8) at eval.c:3023
#45 0x00005555557fb3e2 in exec_byte_code (bytestr=0x555555e52104, vector=0x555555e4359d, maxdepth=0x22, args_template=0x0, nargs=0, args=0x0) at bytecode.c:632
#46 0x00005555557fa8de in Fbyte_code (bytestr=0x555555e52104, vector=0x555555e4359d, maxdepth=0x22) at bytecode.c:334
#47 0x00005555557ad73c in eval_sub (form=0x555555e34933) at eval.c:2504
#48 0x00005555557e40d4 in readevalloop (readcharfun=0x7830, infile0=0x7fffffffb900, sourcename=0x555555e52044, printflag=false, unibyte=0x0, readfun=0x0, start=0x0, end=0x0) at lread.c:2326
#49 0x00005555557e1df8 in Fload (file=0x555555e51e14, noerror=0x30, nomessage=0x30, nosuffix=0x0, must_suffix=0x0) at lread.c:1579
#50 0x00005555557af1b8 in funcall_subr (subr=0x555555c69900 <Sload>, numargs=3, args=0x7fffffffbb00) at eval.c:3110
#51 0x00005555557aecde in Ffuncall (nargs=4, args=0x7fffffffbaf8) at eval.c:3023
#52 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff025a724, vector=0x7ffff025a2ed, maxdepth=0x1e, args_template=0x406, nargs=1, args=0x7fffffffc010) at bytecode.c:632
#53 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff025a2bd, syms_left=0x406, nargs=1, args=0x7fffffffc008) at eval.c:3147
#54 0x00005555557af71a in funcall_lambda (fun=0x7ffff025a2bd, nargs=1, arg_vector=0x7fffffffc008) at eval.c:3228
#55 0x00005555557aed32 in Ffuncall (nargs=2, args=0x7fffffffc000) at eval.c:3027
#56 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff025b344, vector=0x7ffff025b2ed, maxdepth=0x2a, args_template=0x80a, nargs=2, args=0x7fffffffc550) at bytecode.c:632
#57 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff025b2bd, syms_left=0x80a, nargs=2, args=0x7fffffffc540) at eval.c:3147
#58 0x00005555557af71a in funcall_lambda (fun=0x7ffff025b2bd, nargs=2, arg_vector=0x7fffffffc540) at eval.c:3228
#59 0x00005555557aed32 in Ffuncall (nargs=3, args=0x7fffffffc538) at eval.c:3027
#60 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff025b384, vector=0x7ffff0259f45, maxdepth=0x2a, args_template=0xc06, nargs=3, args=0x7fffffffca98) at bytecode.c:632
#61 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff0259f15, syms_left=0xc06, nargs=3, args=0x7fffffffca80) at eval.c:3147
#62 0x00005555557af71a in funcall_lambda (fun=0x7ffff0259f15, nargs=3, arg_vector=0x7fffffffca80) at eval.c:3228
#63 0x00005555557aed32 in Ffuncall (nargs=4, args=0x7fffffffca78) at eval.c:3027
#64 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff04d5c4c, vector=0x7ffff03295c5, maxdepth=0x3a, args_template=0x2, nargs=0, args=0x7fffffffd538) at bytecode.c:632
--Type <RET> for more, q to quit, c to continue without paging--
#65 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff0329595, syms_left=0x2, nargs=0, args=0x7fffffffd538) at eval.c:3147
#66 0x00005555557af71a in funcall_lambda (fun=0x7ffff0329595, nargs=0, arg_vector=0x7fffffffd538) at eval.c:3228
#67 0x00005555557aed32 in Ffuncall (nargs=1, args=0x7fffffffd530) at eval.c:3027
#68 0x00005555557fb3e2 in exec_byte_code (bytestr=0x7ffff04d7f34, vector=0x7ffff0328c0d, maxdepth=0x26, args_template=0x2, nargs=0, args=0x7fffffffdc20) at bytecode.c:632
#69 0x00005555557af38d in fetch_and_exec_byte_code (fun=0x7ffff0328bdd, syms_left=0x2, nargs=0, args=0x7fffffffdc20) at eval.c:3147
#70 0x00005555557af71a in funcall_lambda (fun=0x7ffff0328bdd, nargs=0, arg_vector=0x7fffffffdc20) at eval.c:3228
#71 0x00005555557af537 in apply_lambda (fun=0x7ffff0328bdd, args=0x0, count=4) at eval.c:3172
#72 0x00005555557ad91c in eval_sub (form=0x7ffff08cae13) at eval.c:2545
#73 0x00005555557ace05 in Feval (form=0x7ffff08cae13, lexical=0x0) at eval.c:2327
#74 0x00005555556f462a in top_level_2 () at keyboard.c:1142
#75 0x00005555557ab0f0 in internal_condition_case (bfun=0x5555556f4607 <top_level_2>, handlers=0x90, hfun=0x5555556f3f73 <cmd_error>) at eval.c:1450
#76 0x00005555556f4672 in top_level_1 (ignore=0x0) at keyboard.c:1150
#77 0x00005555557aa822 in internal_catch (tag=0xe7f0, func=0x5555556f462c <top_level_1>, arg=0x0) at eval.c:1181
#78 0x00005555556f455b in command_loop () at keyboard.c:1110
#79 0x00005555556f3b28 in recursive_edit_1 () at keyboard.c:720
#80 0x00005555556f3cc7 in Frecursive_edit () at keyboard.c:803
#81 0x00005555556f0717 in main (argc=3, argv=0x7fffffffe198) at emacs.c:2354
(gdb) q


$ ls 28.0.90-8dcada16/
cconv-3b1f1f98-cca24f72.eln  xterm-6ea901d1-05e64e57.eln

On Wed, Dec 8, 2021 at 9:15 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: hx <silent2600@gmail.com>
> Date: Wed, 8 Dec 2021 14:01:29 +0800
>
> I changed the flags of dlopen in dynlib.c:
>
> dynlib_handle_ptr
> dynlib_open (const char *path)
> {
>   // return dlopen (path, RTLD_LAZY);                                                                                                                   
>                                                                                                                       
>   return dlopen (path, RTLD_LAZY|RTLD_GLOBAL);
> }
>
> then my dynamic module can load other .so in emacs-27.
>
> but it make gccemacs-28 crash:
>
> $ /usr/src/emacs/src/emacs -nw -q
> Fatal error 11: Segmentation fault
> Backtrace:
> /usr/src/emacs/src/emacs(+0x1c4c13)[0x558a8d05fc13]
> /usr/src/emacs/src/emacs(+0x199a0e)[0x558a8d034a0e]
> /usr/src/emacs/src/emacs(+0x1c44d8)[0x558a8d05f4d8]

Please run this under GDB and show the backtrace from the crash in
human-readable form.

Also, please describe what you did immediately before the crash.

Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]