Module Linker
rr
Module Linker | rr | |
---|---|---|
1 | 109 | |
250 | 9,122 | |
- | 0.8% | |
0.0 | 9.6 | |
about 3 years ago | about 8 hours ago | |
JavaScript | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Module Linker
rr
- Greppability is an underrated code metric
-
Tbsp – treesitter-based source processing language
Hi, in case you're not already aware of the name clash, there's already a `rr` in the programming world. It's "record and replay": https://rr-project.org/.
Very different, but a very fine tool tool.
-
Deterministic Replay of QEMU Emulation
I don't know, however a key element is:
> Record/replay system is based on saving and replaying non-deterministic events
> The following non-deterministic data from peripheral devices is saved into the log: mouse and keyboard input, network packets, audio controller input, serial port input, and hardware clocks (they are non-deterministic too, because their values are taken from the host machine). Inputs from simulated hardware, memory of VM, software interrupts, and execution of instructions are not saved into the log, because they are deterministic and can be replayed by simulating the behavior of virtual machine starting from initial state.
So, it's probably not much, you can probably comfortably save minutes of qemu sessions.
Also note the existence of the rr debugger [1], which allows you to reverse debug applications with a ~10% performance hit while recording. To achieve this, it records results of syscalls (only). It will serialize thread events, so have the effect of running applications like on a single core CPU.
[1] https://rr-project.org/
-
How does it feel to test a compiler?
rr.
rr rr rr rr.
rr!
When testing "algorithmic" modules like compilers, it's basically a productivity cheat code to run the tests under https://rr-project.org/. Doing so allows you to deterministically replay execution, seeking forwards and backwards in the timeline of your program's execution, and quickly locate what went wrong in any computation.
For example, if we have
struct CircleDescription {
-
rr – record and replay debugger for C/C++
It says on https://rr-project.org/ that it supports Go programm, what's the status?
-
GTFL – A Graphical Terminal for Common Lisp
This was because no matter how hard I tried, I kept running into variables that I was watching that appeared to be the same reference, have different values (so I know I was referring to something wrong, but could not for the life of me figure it out, and though if I only had a way to step/trace and do this visually like an AST that highlights changed values and you could see back to its root where it's actually being modified visually)
I found out there's a thing called "deterministic debugging" (and the biggest known example afaict is rr: https://rr-project.org/
Apparently MS has a time-travel debugger... I pictured the AST being populated and repopulated via the steps, and the ability to diff changes over time.
Here's a wiki on various systems, though most of these seem to be typical text based "trace" options.
https://en.wikipedia.org/wiki/Time_travel_debugging
- rr: Lightweight Recording and Deterministic Debugging
-
Hermit is a hermetic and reproducible sandbox for running programs
I think this tool must share a lot techniques and use cases with rr. I wonder how it compares in various aspects.
https://rr-project.org/
rr "sells" as a "reversible debugger", but it obviously needs the determinism for its record and replay to work, and AFAIK it employs similar techniques regarding system call interception and serializing on a single CPU. The reversible debugger aspect is built on periodic snapshotting on top of it and replaying from those snapshots, AFAIK. They package it in a gdb compatible interface.
Hermit also lists record/replay as a motivation, although it doesn't list reversible debugging in general.
- Rr: Lightweight Recording and Deterministic Debugging
-
Deep Bug
Interesting. Perhaps you can inspect the disassembly of the function in question when using Graal and HotSpot. It is likely related to that.
Another debugging technique we use for heisenbugs is to see if `rr` [1] can reproduce it. If it can then that's great as it allows you to go back in time to debug what may have caused the bug. But `rr` is often not great for concurrency bugs since it emulates a single-core machine. Though debugging a VM is generally a nightmare. What we desperately need is a debugger that can debug both the VM and the language running on top of it. Usually it's one or the other.
> In general I’d argue you haven’t fixed a bug unless you understand why it happened and why your fix worked, which makes this frustrating, since every indication is that the bug exists within proprietary code that is out of my reach.
Were you using Oracle GraalVM? GraalVM community edition is open source, so maybe it's worth checking if it is reproducible in that.
[1]: https://github.com/rr-debugger/rr
What are some alternatives?
gdbgui - Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
CodeLLDB - A native debugger extension for VSCode based on LLDB
just - 🤖 Just a command runner
rrweb - record and replay the web
cbindgen - A project for generating C bindings from Rust code
gef - GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux
sublime-rust - The official Sublime Text 4 package for the Rust Programming Language
clog-cli - Generate beautiful changelogs from your Git commit history
rust-cross - Everything you need to know about cross compiling Rust programs!
nbdev - Create delightful software with Jupyter Notebooks
rustfmt - Format Rust code