From: Philipp Stephani <p.stephani2@gmail.com>
To: 42540@debbugs.gnu.org
Subject: bug#42540: 28.0.50; macOS assertion failure in src/alloc-tests
Date: Sat, 25 Jul 2020 21:32:39 +0200 [thread overview]
Message-ID: <CAArVCkTVgAM7vHUp9-wkt0D-07K8aQFqJvEeQfK2QigMP3AbCA@mail.gmail.com> (raw)
In-Reply-To: <m2v9ibmm4h.fsf@gmail.com>
Am Sa., 25. Juli 2020 um 21:28 Uhr schrieb Philipp <p.stephani2@gmail.com>:
>
>
> This is another follow-up to Bug#30700. It's rather subtle, and I
> couldn't get GDB to work, so here's the LLDB backtrace:
>
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
> * frame #0: 0x00007fff6fa6f33a libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x00007fff6fb2be60 libsystem_pthread.dylib`pthread_kill + 430
> frame #2: 0x00007fff6f98693e libsystem_c.dylib`raise + 26
> frame #3: 0x00000001004a24e2 emacs`terminate_due_to_signal(sig=6, backtrace_limit=40) at emacs.c:409:3
> frame #4: 0x00000001004a28f3 emacs`emacs_abort at sysdep.c:2431:3
> frame #5: 0x0000000100292071 emacs`string_bytes(s=0x0000000101330300) at alloc.c:1702:5
> frame #6: 0x000000010031e7c5 emacs`STRING_BYTES(s=0x0000000101330300) at lisp.h:1621:22
> frame #7: 0x0000000100300fcd emacs`SBYTES(string=(i = 0x0000000101330304)) at lisp.h:1632:10
> frame #8: 0x000000010030e411 emacs`internal_equal(o1=(i = 0x0000000101330304), o2=(i = 0x00000001013302e4), equal_kind=EQUAL_PLAIN, depth=0, ht=(i = 0x0000000000000000)) at fns.c:2489:11
> frame #9: 0x00000001003073b5 emacs`Fequal(o1=(i = 0x0000000101330304), o2=(i = 0x00000001013302e4)) at fns.c:2321:10
> frame #10: 0x00000001002f94a6 emacs`funcall_subr(subr=0x00000001005290e8, numargs=2, args=0x00007ffeefbf1928) at eval.c:2870:19
> frame #11: 0x00000001002f7b1d emacs`Ffuncall(nargs=3, args=0x00007ffeefbf1920) at eval.c:2795:11
> frame #12: 0x00000001002f78d9 emacs`Fapply(nargs=2, args=0x00007ffeefbf1a90) at eval.c:2425:24
> frame #13: 0x00000001002e9de2 emacs`eval_sub(form=(i = 0x0000000101898993)) at eval.c:2246:10
> frame #14: 0x00000001002eaffa emacs`Fsetq(args=(i = 0x00000001018989b3)) at eval.c:509:13
> frame #15: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x00000001018989c3)) at eval.c:2227:8
> frame #16: 0x00000001002efe9e emacs`Funwind_protect(args=(i = 0x0000000101897d83)) at eval.c:1213:9
> frame #17: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897d73)) at eval.c:2227:8
> frame #18: 0x00000001002ea8ad emacs`Fif(args=(i = 0x0000000101897dd3)) at eval.c:414:10
> frame #19: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897dc3)) at eval.c:2227:8
> frame #20: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #21: 0x00000001002ef0df emacs`Flet(args=(i = 0x0000000101897e23)) at eval.c:987:9
> frame #22: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897e33)) at eval.c:2227:8
> frame #23: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x00000001018986a3)) at eval.c:462:13
> frame #24: 0x00000001002ef0df emacs`Flet(args=(i = 0x0000000101897e63)) at eval.c:987:9
> frame #25: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897e73)) at eval.c:2227:8
> frame #26: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #27: 0x00000001002ed57f emacs`FletX(args=(i = 0x0000000101897e93)) at eval.c:919:9
> frame #28: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897ea3)) at eval.c:2227:8
> frame #29: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000101898d53)) at eval.c:462:13
> frame #30: 0x00000001002ef0df emacs`Flet(args=(i = 0x0000000101897f13)) at eval.c:987:9
> frame #31: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897f23)) at eval.c:2227:8
> frame #32: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #33: 0x00000001002eacd5 emacs`prog_ignore(body=(i = 0x0000000101897f53)) at eval.c:473:3
> frame #34: 0x00000001002ef309 emacs`Fwhile(args=(i = 0x0000000101897f43)) at eval.c:1008:7
> frame #35: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897f33)) at eval.c:2227:8
> frame #36: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #37: 0x00000001002ef0df emacs`Flet(args=(i = 0x0000000101897f73)) at eval.c:987:9
> frame #38: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897f83)) at eval.c:2227:8
> frame #39: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #40: 0x00000001002ef0df emacs`Flet(args=(i = 0x0000000101897fa3)) at eval.c:987:9
> frame #41: 0x00000001002e85d9 emacs`eval_sub(form=(i = 0x0000000101897fb3)) at eval.c:2227:8
> frame #42: 0x00000001002eaa97 emacs`Fprogn(body=(i = 0x0000000000000000)) at eval.c:462:13
> frame #43: 0x00000001002fa133 emacs`funcall_lambda(fun=(i = 0x000000010189e763), nargs=0, arg_vector=0x00007ffeefbf4a38) at eval.c:3065:11
> frame #44: 0x00000001002f7cff emacs`Ffuncall(nargs=1, args=0x00007ffeefbf4a30) at eval.c:2809:8
> frame #45: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x0000000101313e64), vector=(i = 0x0000000101848fad), maxdepth=(i = 0x000000000000002a), args_template=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbf5ac8) at bytecode.c:635:12
> frame #46: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x00000001018490ed), syms_left=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbf5ac0) at eval.c:2917:10
> frame #47: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x00000001018490ed), nargs=1, arg_vector=0x00007ffeefbf5ac0) at eval.c:2998:11
> frame #48: 0x00000001002f7b6f emacs`Ffuncall(nargs=2, args=0x00007ffeefbf5ab8) at eval.c:2797:11
> frame #49: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x0000000101314344), vector=(i = 0x000000010184967d), maxdepth=(i = 0x0000000000000036), args_template=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbf6b10) at bytecode.c:635:12
> frame #50: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x00000001018497a5), syms_left=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbf6b08) at eval.c:2917:10
> frame #51: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x00000001018497a5), nargs=1, arg_vector=0x00007ffeefbf6b08) at eval.c:2998:11
> frame #52: 0x00000001002f7b6f emacs`Ffuncall(nargs=2, args=0x00007ffeefbf6b00) at eval.c:2797:11
> frame #53: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x00000001013162d4), vector=(i = 0x0000000101858975), maxdepth=(i = 0x000000000000003a), args_template=(i = 0x0000000000000c0e), nargs=3, args=0x00007ffeefbf7b78) at bytecode.c:635:12
> frame #54: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x0000000101858a3d), syms_left=(i = 0x0000000000000c0e), nargs=3, args=0x00007ffeefbf7b60) at eval.c:2917:10
> frame #55: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x0000000101858a3d), nargs=3, arg_vector=0x00007ffeefbf7b60) at eval.c:2998:11
> frame #56: 0x00000001002f7b6f emacs`Ffuncall(nargs=4, args=0x00007ffeefbf7b58) at eval.c:2797:11
> frame #57: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x0000000101316394), vector=(i = 0x0000000101858ae5), maxdepth=(i = 0x000000000000003a), args_template=(i = 0x0000000000000c0a), nargs=3, args=0x00007ffeefbf8b98) at bytecode.c:635:12
> frame #58: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x0000000101858bdd), syms_left=(i = 0x0000000000000c0a), nargs=3, args=0x00007ffeefbf8b80) at eval.c:2917:10
> frame #59: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x0000000101858bdd), nargs=3, arg_vector=0x00007ffeefbf8b80) at eval.c:2998:11
> frame #60: 0x00000001002f7b6f emacs`Ffuncall(nargs=4, args=0x00007ffeefbf8b78) at eval.c:2797:11
> frame #61: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x0000000101316b94), vector=(i = 0x000000010185b875), maxdepth=(i = 0x000000000000002a), args_template=(i = 0x0000000000000402), nargs=1, args=0x00007ffeefbf9b40) at bytecode.c:635:12
> frame #62: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x000000010185b8d5), syms_left=(i = 0x0000000000000402), nargs=1, args=0x00007ffeefbf9b38) at eval.c:2917:10
> frame #63: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x000000010185b8d5), nargs=1, arg_vector=0x00007ffeefbf9b38) at eval.c:2998:11
> frame #64: 0x00000001002f7b6f emacs`Ffuncall(nargs=2, args=0x00007ffeefbf9b30) at eval.c:2797:11
> frame #65: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x00000001013172f4), vector=(i = 0x000000010185d4f5), maxdepth=(i = 0x000000000000001a), args_template=(i = 0x0000000000000402), nargs=1, args=0x00007ffeefbfa9b8) at bytecode.c:635:12
> frame #66: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x000000010185d55d), syms_left=(i = 0x0000000000000402), nargs=1, args=0x00007ffeefbfa9b0) at eval.c:2917:10
> frame #67: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x000000010185d55d), nargs=1, arg_vector=0x00007ffeefbfa9b0) at eval.c:2998:11
> frame #68: 0x00000001002f3fd2 emacs`apply_lambda(fun=(i = 0x000000010185d55d), args=(i = 0x000000010189e123), count=12) at eval.c:2942:9
> frame #69: 0x00000001002ea26d emacs`eval_sub(form=(i = 0x000000010189e0b3)) at eval.c:2319:12
> frame #70: 0x00000001002f265b emacs`Feval(form=(i = 0x000000010189e0b3), lexical=(i = 0x0000000000000030)) at eval.c:2103:28
> frame #71: 0x00000001002f94a6 emacs`funcall_subr(subr=0x0000000100527c48, numargs=2, args=0x00007ffeefbfb0d8) at eval.c:2870:19
> frame #72: 0x00000001002f7b1d emacs`Ffuncall(nargs=3, args=0x00007ffeefbfb0d0) at eval.c:2795:11
> frame #73: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x00000001040676cc), vector=(i = 0x0000000104066275), maxdepth=(i = 0x0000000000000066), args_template=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbfc4e8) at bytecode.c:635:12
> frame #74: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x0000000104066245), syms_left=(i = 0x0000000000000406), nargs=1, args=0x00007ffeefbfc4e0) at eval.c:2917:10
> frame #75: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x0000000104066245), nargs=1, arg_vector=0x00007ffeefbfc4e0) at eval.c:2998:11
> frame #76: 0x00000001002f7b6f emacs`Ffuncall(nargs=2, args=0x00007ffeefbfc4d8) at eval.c:2797:11
> frame #77: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x000000010406b424), vector=(i = 0x000000010406791d), maxdepth=(i = 0x000000000000003a), args_template=(i = 0x0000000000000002), nargs=0, args=0x00007ffeefbfdb18) at bytecode.c:635:12
> frame #78: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x00000001040678ed), syms_left=(i = 0x0000000000000002), nargs=0, args=0x00007ffeefbfdb18) at eval.c:2917:10
> frame #79: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x00000001040678ed), nargs=0, arg_vector=0x00007ffeefbfdb18) at eval.c:2998:11
> frame #80: 0x00000001002f7b6f emacs`Ffuncall(nargs=1, args=0x00007ffeefbfdb10) at eval.c:2797:11
> frame #81: 0x000000010037f7ef emacs`exec_byte_code(bytestr=(i = 0x000000010406c0ec), vector=(i = 0x000000010406b5f5), maxdepth=(i = 0x0000000000000032), args_template=(i = 0x0000000000000002), nargs=0, args=0x00007ffeefbfeb90) at bytecode.c:635:12
> frame #82: 0x00000001002fe8e1 emacs`fetch_and_exec_byte_code(fun=(i = 0x000000010406b5c5), syms_left=(i = 0x0000000000000002), nargs=0, args=0x00007ffeefbfeb90) at eval.c:2917:10
> frame #83: 0x00000001002f9a8b emacs`funcall_lambda(fun=(i = 0x000000010406b5c5), nargs=0, arg_vector=0x00007ffeefbfeb90) at eval.c:2998:11
> frame #84: 0x00000001002f3fd2 emacs`apply_lambda(fun=(i = 0x000000010406b5c5), args=(i = 0x0000000000000000), count=4) at eval.c:2942:9
> frame #85: 0x00000001002ea26d emacs`eval_sub(form=(i = 0x000000010421c09b)) at eval.c:2319:12
> frame #86: 0x00000001002f265b emacs`Feval(form=(i = 0x000000010421c09b), lexical=(i = 0x0000000000000000)) at eval.c:2103:28
> frame #87: 0x00000001001d8c0a emacs`top_level_2 at keyboard.c:1100:10
> frame #88: 0x00000001002f095f emacs`internal_condition_case(bfun=(emacs`top_level_2 at keyboard.c:1099), handlers=(i = 0x0000000000000090), hfun=(emacs`cmd_error at keyboard.c:919)) at eval.c:1356:25
> frame #89: 0x00000001001d8831 emacs`top_level_1(ignore=(i = 0x0000000000000000)) at keyboard.c:1108:5
> frame #90: 0x00000001002efd4a emacs`internal_catch(tag=(i = 0x000000000000c900), func=(emacs`top_level_1 at keyboard.c:1105), arg=(i = 0x0000000000000000)) at eval.c:1117:25
> frame #91: 0x00000001001b5083 emacs`command_loop at keyboard.c:1069:2
> frame #92: 0x00000001001b4ea4 emacs`recursive_edit_1 at keyboard.c:714:9
> frame #93: 0x00000001001b5326 emacs`Frecursive_edit at keyboard.c:786:3
> frame #94: 0x00000001001b1f35 emacs`main(argc=14, argv=0x00007ffeefbff570) at emacs.c:2043:3
> frame #95: 0x00007fff6f927cc9 libdyld.dylib`start + 1
>
> This runs into the following codepath:
>
> frame #5: 0x0000000100292071 emacs`string_bytes(s=0x0000000101330300) at alloc.c:1702:5
> 1699
> 1700 if (!PURE_P (s) && !pdumper_object_p (s) && s->u.s.data
> 1701 && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s)))
> -> 1702 emacs_abort ();
> 1703 return nbytes;
> 1704 }
> 1705
>
> Here we have:
>
> (lldb) p *((sdata*)( s->u.s.data - 16))
> (sdata) $11 = {
> string = 0x0000000101330300
> n = {
> string = 0x0000000101330300
> nbytes = 1
> }
> }
> (lldb) p *$11.string
> (Lisp_String) $12 = {
> u = {
> s = {
> size = 1
> size_byte = 3
> intervals = 0x0000000000000000
> data = 0x0000000102060ce0 "✓"
> }
> next = 0x0000000000000001
> gcaligned = '\x01'
> }
> }
>
> That is, the string "✓" has 3 bytes and 1 character, yet sdata.n.nbytes
> is 1 instead of 3, triggering the assertion failure. I have no idea
> where this comes from, though.
>
Crystal ball: The fix for Bug#39207 is incomplete when
GC_CHECK_STRING_BYTES = 1.
next prev parent reply other threads:[~2020-07-25 19:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 19:26 bug#42540: 28.0.50; macOS assertion failure in src/alloc-tests Philipp
2020-07-25 19:32 ` Philipp Stephani [this message]
2020-07-26 12:20 ` Philipp Stephani
2020-08-01 19:06 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAArVCkTVgAM7vHUp9-wkt0D-07K8aQFqJvEeQfK2QigMP3AbCA@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=42540@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.