-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when running
copy -bik
and also clean up cmd_copy()
Reproducer: * Start `dte` * Insert a few characters * Run `copy -bik` Result: > src/block-iter.c:356: **BUG** in block_iter_get_bytes(): > 'pos < len && blk->node.next == bi->head' > > Stack trace: > #0 0x721e6a90bdd8 in __sanitizer_print_stack_trace asan_stack.cpp:87 > #1 0x5fe2730bb194 in print_stack_trace src/util/debug.c:67 > #2 0x5fe2730bb72f in bug src/util/debug.c:86 > #3 0x5fe272fe0d43 in block_iter_get_bytes src/block-iter.c:356 > #4 0x5fe27300516b in cmd_copy src/commands.c:509 > #5 0x5fe272fdcc8a in command_func_call src/command/run.h:74 > #6 0x5fe272fdd29d in handle_binding src/bind.c:51 > #7 0x5fe27304acef in handle_input_single src/mode.c:80 > #8 0x5fe27304b08a in handle_input_recursive src/mode.c:89 > #9 0x5fe27304b311 in handle_input src/mode.c:106 > #10 0x5fe273023a01 in main_loop src/editor.c:338 > #11 0x5fe273049b0f in main src/main.c:663 > #12 0x721e69e34e07 (/usr/lib/libc.so.6+0x25e07) > #13 0x721e69e34ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) > #14 0x5fe272fdcb24 in _start (dte/dte+0x16bb24) Thanks to Pedro Navarro for the bug report!
- Loading branch information
1 parent
702f2fd
commit 93d7ea6
Showing
3 changed files
with
17 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters