Open praschke opened 3 months ago
If you scroll at moderate speed do you see a bunch of warnings in the builtin console widget?
also now i'm not so sure that wayland is related, i'm now getting freezes in X when trying to open the same executable again.
Ok this looks like combination of two problems:
I cannot reproduce it on Debian. And the PCRE2 and NixOS issues don't mention problems with JIT anywhere. This will need a little time until I have set up a NixOS VM. Also because we want to report this to the PCRE2 folks. But we could just disable JIT for NixOS as well.
@praschke Setting up NixOS takes pretty long for me (installing qt6/5 doesn't work and more). And I don't know unfortunately, when I will find time to take care of it.
So if you are willing, you can test the following patches, which disables JIT for the regex engine.
If they do work, it means NixOS has problems with the PCRE2 JIT as well. We shoud report this in https://github.com/NixOS/nixpkgs/issues/300056 in this case. And than see how they'd like to solve it.
Diffs
They are for rizin
. Not for Cutter. So they need to be applied in the rizin submodule.
diff --git a/meson.build b/meson.build
index a8153a2ee5..787cbfae06 100644
--- a/meson.build
+++ b/meson.build
@@ -197,7 +197,7 @@ endif
# Handle PCRE2
cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv32', 'riscv64', 's390x', 'x86', 'x86_64' ]
-pcre2_jit_supported = target_machine.cpu_family() in cpu_jit_supported and cc.get_id() != 'tcc' and target_machine.system() != 'darwin'
+pcre2_jit_supported = false
if pcre2_jit_supported
add_project_arguments(['-DSUPPORTS_PCRE2_JIT'], language: 'c')
endif
diff --git a/subprojects/packagefiles/pcre2/meson.build b/subprojects/packagefiles/pcre2/meson.build
index b40ea85740..f3ee7a02ed 100644
--- a/subprojects/packagefiles/pcre2/meson.build
+++ b/subprojects/packagefiles/pcre2/meson.build
@@ -60,18 +60,6 @@ cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv
# tcc doesn't support the MSVC asm syntax PCRE2 uses (`__asm { ... }`).
# Darwin kernel not as well, because of forbidden wx memory.
# It is used in the JIT compiler code.
-if cc.get_id() != 'tcc' and target_machine.cpu_family() in cpu_jit_supported and target_machine.system() != 'darwin'
- libpcre2_c_args += ['-DSUPPORT_JIT']
- pcre2_files += ['src/pcre2_jit_compile.c']
-endif
-
-if target_machine.system() == 'openbsd'
- # jit compilation fails with "no more memory" if wx allocations are allowed.
- libpcre2_c_args += ['-DSLJIT_WX_EXECUTABLE_ALLOCATOR']
-elif target_machine.system() == 'netbsd'
- # jit compilation fails with "no more memory" if wx allocations are allowed.
- libpcre2_c_args += ['-DSLJIT_PROT_EXECUTABLE_ALLOCATOR']
-endif
pcre2_includes = [
include_directories('.'),
Environment information
Describe the bug
Scrolling too quickly in the disassembly freezes Cutter.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Cutter doesn't freeze.
Additional context
The freeze only occurs on Wayland. On Xwayland it functions normally.
backtrace:
``` #0 0x000075eef743697f in write () from /nix/store/1rm6sr6ixxzipv5358x0cmaw8rs84g2j-glibc-2.38-44/lib/libc.so.6 #1 0x000075eef73b877d in _IO_file_write@@GLIBC_2.2.5 () from /nix/store/1rm6sr6ixxzipv5358x0cmaw8rs84g2j-glibc-2.38-44/lib/libc.so.6 #2 0x000075eef73b6a44 in new_do_write () from /nix/store/1rm6sr6ixxzipv5358x0cmaw8rs84g2j-glibc-2.38-44/lib/libc.so.6 #3 0x000075eef73b8971 in __GI__IO_file_xsputn () from /nix/store/1rm6sr6ixxzipv5358x0cmaw8rs84g2j-glibc-2.38-44/lib/libc.so.6 #4 0x000075eef73abf4b in fputs () from /nix/store/1rm6sr6ixxzipv5358x0cmaw8rs84g2j-glibc-2.38-44/lib/libc.so.6 #5 0x000075eef936d0af in rz_vlog () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_util.so.0.7 #6 0x000075eef936d2e7 in rz_log () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_util.so.0.7 #7 0x000075eef9377e45 in print_pcre2_err () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_util.so.0.7 #8 0x000075eef9377f8c in rz_regex_new () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_util.so.0.7 #9 0x000075eef8959409 in subvar () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_parse.so.0.7 #10 0x000075eefa50f3a8 in ds_build_op_str () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_core.so.0.7 #11 0x000075eefa517902 in rz_core_print_disasm () from /nix/store/1bwr5a2jinva4m5rzrbbhbzxpdbl1bk8-rizin-0.7.2/lib/librz_core.so.0.7 #12 0x0000000000521392 in CutterCore::disassembleLines(unsigned long long, int) () #13 0x00000000006068ec in DisassemblyWidget::refreshDisasm(unsigned long long) () #14 0x0000000000607214 in DisassemblyWidget::scrollInstructions(int) () #15 0x000075eef83ddd53 in void doActivateAttached file:
vpatch.zip