▸case-01 I have a legacy C++ network socket handler that manually calls raw memory allocations, causing intermittent memory leaks. Please provide a structured refactoring guide with code examples demonstrating how to wrap this socket safely using modern smart pointers, along with verification steps to ensure resources are cleaned up. | fail→fail | 22,606 | 20,460 | -9% | 1 | 1 | 0% | 3,807 | 3,788 | -0% | 0 | 0 | — |
▸case-02 Our team is designing a file processing pipeline and needs to ensure file handles close automatically during panics or exceptions across our C++ and Rust components. Could you give us a side-by-side pattern comparison with concrete implementation steps and validation techniques to prevent dangling references? | fail→fail | 25,753 | 21,317 | -17% | 1 | 1 | 0% | 4,468 | 3,875 | -13% | 0 | 0 | — |
▸case-03 I am debugging a custom memory pool in C that suffers from intermittent use-after-free crashes when objects are recycled. Please walk me through a clear remediation checklist with actionable code updates and diagnostic strategies to eliminate these safety bugs. | fail→fail | 26,677 | 18,039 | -32% | 1 | 1 | 0% | 4,519 | 3,291 | -27% | 0 | 0 | — |
▸case-04 We are tuning a C++ numerical linear algebra engine for matrix multiplication performance on Linux x86_64. We want to optimize CPU execution speed using GCC compiler flags. Please provide a recommended build flag list and explain how loop vectorization and link-time optimization affect performance output. | pass→pass | 23,698 | 25,400 | +7% | 1 | 1 | 0% | 3,758 | 4,169 | +11% | 0 | 0 | — |
▸case-05 We are implementing a custom C binary network protocol for sensor data packets with fixed 16-byte headers and payload CRC32 verification. Please outline the byte layout structure and algorithm steps for computing the payload checksum in C without altering memory management patterns. | pass→pass | 19,151 | 17,166 | -10% | 1 | 1 | 0% | 3,813 | 3,496 | -8% | 0 | 0 | — |
▸case-06 Our low-latency market feed handler in C++ on Linux needs to pin worker threads to dedicated CPU cores and set real-time scheduling priority. Please provide the POSIX API calls and configuration steps for core pinning and real-time thread priority. | pass→pass | 20,101 | 15,290 | -24% | 1 | 1 | 0% | 3,557 | 3,040 | -15% | 0 | 0 | — |
▸case-07 In a C++ document object graph, parent nodes hold pointers to child nodes, and child nodes need back-pointers to parents. Developers are proposing using std::shared_ptr for both directions. Please evaluate this design, identify potential memory leaks, provide the correct smart pointer pattern, and state required inputs. | fail→pass | 14,482 | 13,324 | -8% | 1 | 1 | 0% | 2,468 | 2,506 | +2% | 0 | 0 | — |
▸case-08 A team is porting a multi-threaded C++ cache to Rust and trying to share a mutable hash map across threads using Rc<RefCell<T>>, which fails compilation. Please provide a thread-safe ownership pattern with implementation details and verification. | fail→fail | 19,814 | 20,102 | +1% | 1 | 1 | 0% | 3,667 | 3,972 | +8% | 0 | 0 | — |
▸case-09 In a C POSIX service, file handles leak when early error returns bypass manual fclose calls. A developer suggested using raw goto labels everywhere. Please provide a modern C pattern using compiler cleanup attributes or structured wrappers to guarantee handle closure, and detail the verification method. | fail→fail | 22,566 | 17,596 | -22% | 1 | 1 | 0% | 3,389 | 2,963 | -13% | 0 | 0 | — |
▸case-10 A legacy C++ buffer allocates dynamic arrays using new uint8_t[len] and assigns them to std::unique_ptr<uint8_t>. The team notices heap corruption during destruction. Please explain the bug, provide the proper smart pointer syntax for dynamic arrays, and supply verification steps. | fail→fail | 13,927 | 15,585 | +12% | 1 | 1 | 0% | 2,301 | 2,805 | +22% | 0 | 0 | — |
▸case-11 A Rust developer wrote a helper function that constructs a formatted String locally and attempts to return &String to the caller, triggering lifetime compiler errors. Please explain why this happens, provide the ownership-transfer solution, and detail verification. | fail→fail | 14,936 | 13,963 | -7% | 1 | 1 | 0% | 2,355 | 2,462 | +5% | 0 | 0 | — |
▸case-12 A C++ service uses OpenSSL SSL pointers (SSL*) and attempts to wrap them in standard std::unique_ptr<SSL> without arguments, causing crash at destruction. Please provide a modern C++ RAII wrapper pattern using custom deleters and verification steps. | fail→fail | 15,036 | 16,522 | +10% | 1 | 1 | 0% | 2,999 | 3,137 | +5% | 0 | 0 | — |
▸case-13 Our team needs to select a automated memory debugging tool for continuous integration testing of a C++ microservice. We want fast build execution with low runtime overhead to detect use-after-free and heap buffer overflows in unit tests. Please analyze tool options, recommend the optimal sanitizer flag, and provide implementation steps. | fail→fail | 24,885 | 18,335 | -26% | 1 | 1 | 0% | 3,991 | 3,273 | -18% | 0 | 0 | — |
▸case-14 A custom C++ file descriptor wrapper manages a raw file descriptor in its destructor, but when objects are copied into a std::vector, application crashes occur with double-close errors. Please explain the missing C++ lifetime management rule, provide the fix, and supply verification steps. | fail→fail | 17,784 | 17,620 | -1% | 1 | 1 | 0% | 3,024 | 2,821 | -7% | 0 | 0 | — |
▸case-15 Our architecture team is evaluating programming languages for a new low-latency network proxy. Primary requirements are deterministic resource destruction without garbage collection pauses, zero-cost abstractions, and strict compile-time memory safety. Please evaluate language options, recommend the best language choice, and provide verification steps. | fail→fail | 27,400 | 23,422 | -15% | 1 | 1 | 0% | 4,138 | 3,776 | -9% | 0 | 0 | — |
▸case-16 In a legacy C networking library, multiple cleanup blocks call free(ptr) on shared buffers, resulting in intermittent double-free crashes during exception recovery. Please outline a safe memory deallocation pattern, code updates, and verification techniques. | fail→fail | 22,027 | 17,119 | -22% | 1 | 1 | 0% | 3,432 | 3,071 | -11% | 0 | 0 | — |
▸case-17 A Rust developer is using unsafe blocks to dereference raw pointers across thread boundaries to bypass lifetime errors, leading to intermittent data races and invalid memory accesses. Please explain why unsafe should be restricted, provide safe abstraction patterns, and supply validation steps. | fail→fail | 18,223 | 17,093 | -6% | 1 | 1 | 0% | 3,035 | 3,104 | +2% | 0 | 0 | — |
▸case-18 A C++ database connection initializer calls raw new for three separate buffer objects sequentially. If the third allocation throws an exception, the first two buffers leak. Please explain exception-safety levels, refactor the allocation sequence using RAII, and outline verification. | fail→fail | 18,386 | 15,762 | -14% | 1 | 1 | 0% | 3,257 | 2,970 | -9% | 0 | 0 | — |
▸case-19 A C++ background daemon gradually consumes RAM over several days without crashing. The team needs a diagnostic methodology using Valgrind Memcheck to pinpoint leak origins and verify fixes. Please provide step-by-step commands, flag settings, and analysis techniques. | fail→fail | 24,154 | 17,811 | -26% | 1 | 1 | 0% | 3,885 | 3,128 | -19% | 0 | 0 | — |
▸case-20 A C++ utility function accepts a std::string parameter, processes it, and returns a std::string_view pointing to a temporary concatenated string. Calling code reads garbage memory. Please identify the lifetime bug, provide the safe return pattern, and give validation steps. | fail→fail | 15,894 | 13,211 | -17% | 1 | 1 | 0% | 2,778 | 2,631 | -5% | 0 | 0 | — |
▸case-21 A Rust developer attempting to mutate shared data inside a struct across multiple threads used RefCell<T>, which fails to compile because RefCell is not thread-safe. Please explain the difference between single-threaded and multi-threaded interior mutability and provide the correct thread-safe pattern. | fail→fail | 18,950 | 16,375 | -14% | 1 | 1 | 0% | 2,942 | 3,152 | +7% | 0 | 0 | — |
▸case-22 A C++ high-throughput message processor initializes shared pointer payloads using std::shared_ptr<Message>(new Message()). The team wants to optimize memory allocations and eliminate exception-safety hazards. Please compare allocation patterns, recommend the optimal smart pointer factory, and provide verification steps. | fail→fail | 22,051 | 23,145 | +5% | 1 | 1 | 0% | 3,643 | 4,273 | +17% | 0 | 0 | — |
▸case-23 A C++ AVX2 vector processing module requires 32-byte aligned heap memory allocations. Manual management of posix_memalign pointers leads to leaks when exceptions occur. Please present an RAII wrapper pattern for aligned dynamic memory and detail validation techniques. | fail→fail | 25,766 | 19,780 | -23% | 1 | 1 | 0% | 5,361 | 3,927 | -27% | 0 | 0 | — |