Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Way to search for string occurence during the lifetime of the program

Aperta
#4,047 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp, rust

Direzione di ricerca

Start with the Rust get_user_input() and main() example, then investigate how rr handles replay state after input is dropped. Done would be a defined way to locate a previously observed string or byte sequence and trace it back to its earlier execution context.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Request

I'm loving this project so much. I'm curious about the possibility of finding a specific string value (or byte sequence in general) that might've occurred and got dropped at some point during the execution of the program. This would be a really helpful feature for debugging, especially in the context of reverse engineering.

Context

I made a dummy Rust code that has a get_user_input() function that prints "Type Something: " and waits for user input, and a main() function that calls get_user_input() inside an infinite loop as shown here:

use std::io::{self, Write};

fn get_user_input() {
    print!("Type something: ");
    std::io::stdout().flush().expect("Failed to flush");

    let mut input = String::new();

    io::stdin()
        .read_line(&mut input)
        .expect("Failed to read line");

    println!("{}", input);
}

fn main() {
    // Print function addresse at runtime
    let addr = get_user_input as *const ();
    println!("Input function location: {:p}", addr);

    loop {
        get_user_input();
    }
}

Rust automatically drops the input variable once the get_user_input() function goes out of scope. The string value itself stays in memory, I was able to verify that using PINCE (a Cheat Engine alternative in Linux). But AFAIU, rr doesn't keep track of unallocated memory because it's unnecessary to reproduce the deterministic outcome of the program. So, in order to find that string in the replay and do a bunch of crazy RE stuff like seeing where it originally came from, I would need to position myself in the right time frame.

Lingua principale
C++
Stelle
10.7k
Fork
666
Merge medio
2g 22h
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rr-debugger/rr

Tutte le issue di rr-debugger/rr

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.