Welcome to the Builder Academy

Question Crash on Look .anything

More
14 Jun 2020 17:32 - 14 Jun 2020 17:33 #8774 by Enceladus
Getting a weird crash on stock tbamud2020 when I do look .obj or look <any number>.obj. Here's the debug from LLDB
Code:
2020-06-15 01:22:48.120251+0800 circle[1517:55047] detected source and destination buffer overlap Process 1517 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00007fff6dceeb66 libsystem_kernel.dylib`__pthread_kill + 10 libsystem_kernel.dylib`__pthread_kill: -> 0x7fff6dceeb66 <+10>: jae 0x7fff6dceeb70 ; <+20> 0x7fff6dceeb68 <+12>: movq %rax, %rdi 0x7fff6dceeb6b <+15>: jmp 0x7fff6dce5ae5 ; cerror_nocancel 0x7fff6dceeb70 <+20>: retq Target 0: (circle) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00007fff6dceeb66 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fff6deb9080 libsystem_pthread.dylib`pthread_kill + 333 frame #2: 0x00007fff6dc4a1ae libsystem_c.dylib`abort + 127 frame #3: 0x00007fff6dc4a321 libsystem_c.dylib`abort_report_np + 177 frame #4: 0x00007fff6dc6ebf5 libsystem_c.dylib`__chk_fail + 48 frame #5: 0x00007fff6dc6ec05 libsystem_c.dylib`__chk_fail_overlap + 16 frame #6: 0x00007fff6dc6ec27 libsystem_c.dylib`__chk_overlap + 34 frame #7: 0x00007fff6dc6ee01 libsystem_c.dylib`__strcpy_chk + 64 frame #8: 0x0000000100090bfe circle`generic_find [inlined] get_number at handler.c:602 [opt] frame #9: 0x0000000100090b9d circle`generic_find(arg=<unavailable>, bitvector=45, ch=0x00000001038b5690, tar_ch=0x00007ffeefbf2b80, tar_obj=0x00007ffeefbf2b68) at handler.c:1359 [opt] frame #10: 0x000000010000744a circle`look_at_target(ch=0x00000001038b5690, arg=<unavailable>) at act.informative.c:718 [opt] frame #11: 0x00000001000071e9 circle`do_look(ch=0x00000001038b5690, argument=" 2.board", cmd=<unavailable>, subcmd=0) at act.informative.c:0 [opt] frame #12: 0x00000001000a0707 circle`command_interpreter(ch=0x00000001038b5690, argument=<unavailable>) at interpreter.c:586 [opt] frame #13: 0x000000010004e20c circle`game_loop(local_mother_desc=3) at comm.c:904 [opt] frame #14: 0x000000010004c383 circle`main [inlined] init_game(local_port=<unavailable>) at comm.c:541 [opt] frame #15: 0x000000010004bf54 circle`main(argc=<unavailable>, argv=<unavailable>) at comm.c:352 [opt] frame #16: 0x00007fff6db9e015 libdyld.dylib`start + 1 (lldb)
Last edit: 14 Jun 2020 17:33 by Enceladus.

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 18:10 #8776 by WhiskyTest
Replied by WhiskyTest on topic Crash on Look .anything
I wasn't able to reproduce this from Cygwin on Windows

Any other info you can provide?

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 11:33 #8777 by Rumble
Replied by Rumble on topic Crash on Look .anything
I was unable to reproduce as well. I noticed it crashed for you on look 2.board, possibly the board code/SPEC. Please provide more details and another example crash.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 12:06 #8778 by Enceladus
Replied by Enceladus on topic Crash on Look .anything
Compiled on MacOS HighSierra

Other commands that will crash it also involve the '.' such as 'read 2.mail' , 'exa 2.obj' , 'look 2.mob' , 'get all 2.bag' , but will NOT crash on 'get 2.bag'.

I went back and compiled stock CircleMUD 3.1 and also get the crash using the above commands as well.

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 12:25 #8779 by Enceladus
Replied by Enceladus on topic Crash on Look .anything
Here is the crash log for the command 'get all 2.bag' :
Code:
(lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00007fff6dceeb66 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fff6deb9080 libsystem_pthread.dylib`pthread_kill + 333 frame #2: 0x00007fff6dc4a1ae libsystem_c.dylib`abort + 127 frame #3: 0x00007fff6dc4a321 libsystem_c.dylib`abort_report_np + 177 frame #4: 0x00007fff6dc6ebf5 libsystem_c.dylib`__chk_fail + 48 frame #5: 0x00007fff6dc6ec05 libsystem_c.dylib`__chk_fail_overlap + 16 frame #6: 0x00007fff6dc6ec27 libsystem_c.dylib`__chk_overlap + 34 frame #7: 0x00007fff6dc6ee01 libsystem_c.dylib`__strcpy_chk + 64 frame #8: 0x0000000100090bfe circle`generic_find [inlined] get_number at handler.c:602 [opt] frame #9: 0x0000000100090b9d circle`generic_find(arg=<unavailable>, bitvector=44, ch=0x0000000103b600d0, tar_ch=0x00007ffeefbf2bb8, tar_obj=0x00007ffeefbf2bc8) at handler.c:1359 [opt] frame #10: 0x000000010001657e circle`do_get(ch=0x0000000103b600d0, argument=<unavailable>, cmd=<unavailable>, subcmd=<unavailable>) at act.item.c:355 [opt] frame #11: 0x00000001000a0707 circle`command_interpreter(ch=0x0000000103b600d0, argument=<unavailable>) at interpreter.c:586 [opt] frame #12: 0x000000010004e20c circle`game_loop(local_mother_desc=3) at comm.c:904 [opt] frame #13: 0x000000010004c383 circle`main [inlined] init_game(local_port=<unavailable>) at comm.c:541 [opt] frame #14: 0x000000010004bf54 circle`main(argc=<unavailable>, argv=<unavailable>) at comm.c:352 [opt] frame #15: 0x00007fff6db9e015 libdyld.dylib`start + 1 (lldb)

And looking at some of the frames:
Code:
(lldb) frame select 8 circle was compiled with optimization - stepping may behave oddly; variables may not be available. frame #8: 0x0000000100090bfe circle`generic_find [inlined] get_number at handler.c:602 [opt] 599 if ((ppos = strchr(*name, '.')) != NULL) { 600 *ppos++ = '\0'; 601 strlcpy(number, *name, sizeof(number)); -> 602 strcpy(*name, ppos); /* strcpy: OK (always smaller) */ 603 604 for (i = 0; *(number + i); i++) 605 if (!isdigit(*(number + i))) (lldb) frame variable (char [512]) number = "2" (char *) ppos = 0x00007ffeefbf2772 "g" (int) i = 0 (lldb) frame select 9 frame #9: 0x0000000100090b9d circle`generic_find(arg=<unavailable>, bitvector=44, ch=0x0000000103b600d0, tar_ch=0x00007ffeefbf2bb8, tar_obj=0x00007ffeefbf2bc8) at handler.c:1359 [opt] 1356 1357 if (!*name) 1358 return (0); -> 1359 if (!(number = get_number(&name))) 1360 return (0); 1361 1362 if (IS_SET(bitvector, FIND_CHAR_ROOM)) { /* Find person in room */ (lldb) frame variable (char *) arg = <variable not available> (bitvector_t) bitvector = 44 (char_data *) ch = 0x0000000103b600d0 (char_data **) tar_ch = 0x00007ffeefbf2bb8 (obj_data **) tar_obj = 0x00007ffeefbf2bc8 (char [512]) name_val = "bag" (char *) name = 0x0000006700676162 "" (int) number = <variable not available> (int) i = <variable not available> (int) found = <variable not available> (lldb) frame select 10 frame #10: 0x000000010001657e circle`do_get(ch=0x0000000103b600d0, argument=<unavailable>, cmd=<unavailable>, subcmd=<unavailable>) at act.item.c:355 [opt] 352 } 353 cont_dotmode = find_all_dots(arg2); 354 if (cont_dotmode == FIND_INDIV) { -> 355 mode = generic_find(arg2, FIND_OBJ_EQUIP | FIND_OBJ_INV | FIND_OBJ_ROOM, ch, &tmp_char, &cont); 356 if (!cont) 357 send_to_char(ch, "You don't have %s %s.\r\n", AN(arg2), arg2); 358 else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER) (lldb) frame variable (char_data *) ch = 0x0000000103b600d0 (char *) argument = <variable not available> (int) cmd = <variable not available> (int) subcmd = <variable not available> (char [512]) arg1 = "all" (char [512]) arg2 = "2.bag" (char [512]) arg3 = "" (int) found = 0 (int) cont_dotmode = 0 (char_data *) tmp_char = 0x0000000000000000 (obj_data *) cont = 0x0000000000000000 (int) mode = <register rax is not available> (int) amount = 1 (lldb) frame select 11 frame #11: 0x00000001000a0707 circle`command_interpreter(ch=0x0000000103b600d0, argument=<unavailable>) at interpreter.c:586 [opt] 583 send_to_char(ch, "No way! You're fighting for your life!\r\n"); 584 break; 585 } else if (no_specials || !special(ch, cmd, line)) -> 586 ((*complete_cmd_info[cmd].command_pointer) (ch, line, cmd, complete_cmd_info[cmd].subcmd)); 587 } 588 589 /* Routines to handle aliasing. */ (lldb) frame variable (char_data *) ch = 0x0000000103b600d0 (char *) argument = <variable not available> (char [512]) arg = "get" (char *) line = 0x00007ffeefbf3673 " all 2.bag" (int) cmd = 499 (int) length = <no location, value may have been optimized out> (lldb) frame select 12 frame #12: 0x000000010004e20c circle`game_loop(local_mother_desc=3) at comm.c:904 [opt] 901 d->has_prompt = TRUE; /* To get newline before next cmd output. */ 902 else if (perform_alias(d, comm, sizeof(comm))) /* Run it through aliasing system */ 903 get_from_q(&d->input, comm, &aliased); -> 904 command_interpreter(d->character, comm); /* Send it to interpreter */ 905 } 906 } 907 (lldb) frame variable (socket_t) local_mother_desc = 3 (char [512]) comm = "get all 2.bag" (timeval) last_time = (tv_sec = 1592395699, tv_usec = 417333) (fd_set) input_set = { fds_bits = { [0] = 16 [1] = 0 [2] = 0 [3] = 0 [4] = 0 [5] = 0 [6] = 0 [7] = 0 [8] = 0 [9] = 0 [10] = 0 [11] = 0 [12] = 0 [13] = 0 [14] = 0 [15] = 0 [16] = 0 [17] = 0 [18] = 0 [19] = 0 [20] = 0 [21] = 0 [22] = 0 [23] = 0 [24] = 0 [25] = 0 [26] = 0 [27] = 0 [28] = 0 [29] = 0 [30] = 0 [31] = 0 } } (int) maxdesc = <variable not available> (descriptor_data *) d = 0x0000000000000000 (timeval) before_sleep = (tv_sec = 1592395699, tv_usec = 319276) (int) missed_pulses = <variable not available> (timeval) now = (tv_sec = 1592395699, tv_usec = 420435) (timeval) timeout = (tv_sec = 0, tv_usec = 0) (fd_set) exc_set = { fds_bits = { [0] = 0 [1] = 0 [2] = 0 [3] = 0 [4] = 0 [5] = 0 [6] = 0 [7] = 0 [8] = 0 [9] = 0 [10] = 0 [11] = 0 [12] = 0 [13] = 0 [14] = 0 [15] = 0 [16] = 0 [17] = 0 [18] = 0 [19] = 0 [20] = 0 [21] = 0 [22] = 0 [23] = 0 [24] = 0 [25] = 0 [26] = 0 [27] = 0 [28] = 0 [29] = 0 [30] = 0 [31] = 0 } } (fd_set) output_set = { fds_bits = { [0] = 16 [1] = 0 [2] = 0 [3] = 0 [4] = 0 [5] = 0 [6] = 0 [7] = 0 [8] = 0 [9] = 0 [10] = 0 [11] = 0 [12] = 0 [13] = 0 [14] = 0 [15] = 0 [16] = 0 [17] = 0 [18] = 0 [19] = 0 [20] = 0 [21] = 0 [22] = 0 [23] = 0 [24] = 0 [25] = 0 [26] = 0 [27] = 0 [28] = 0 [29] = 0 [30] = 0 [31] = 0 } } (descriptor_data *) next_d = 0x0000000000000000 (int) aliased = 0 (fd_set) null_set = <no location, value may have been optimized out> (timeval) opt_time = <no location, value may have been optimized out> (timeval) process_time = <no location, value may have been optimized out> (timeval) temp_time = <no location, value may have been optimized out>

Please Log in or Create an account to join the conversation.

More
27 Jun 2020 10:12 #8795 by Enceladus
Replied by Enceladus on topic Crash on Look .anything
I took the files over to my Windows computer and compiled under Windows Subsystem for Linux with gcc and I no longer get the crash with looking at 2. of anything while on that computer. On OSX homebrew uses clang to compile. Maybe there's some issue going on here with clang?

Please Log in or Create an account to join the conversation.

Time to create page: 0.184 seconds