Task task9_cpp_footguns

# C++ Bug Hunt: Fix Subtle Errors

You'll find several C++ files in the `input/` directory. Each file contains realistic code that does something useful, but has ONE subtle bug.

## Your Task

Fix the bug in each file so that:
1. The code compiles without warnings (`-Wall -Wextra -Werror`)
2. The code passes sanitizer checks (ASan/UBSan)
3. The code produces the correct expected output

## Files

- `virtual_destructor.cpp` - Plugin system with memory management
- `reference_to_temporary.cpp` - Configuration system
- `iterator_invalidation.cpp` - Event queue processor
- `unsigned_underflow.cpp` - Ring buffer implementation
- `dangling_cstr.cpp` - Log formatting system
- `init_order.cpp` - Coordinate system with units
- `off_by_one.cpp` - Matrix border detection
- `int_overflow.cpp` - Bulk price calculator

Each file is independent. Fix bugs **IN PLACE** (modify the files in `input/`).


PS: You are currently working in an automated system and cannot ask any question or have back and forth with an user.

Results

23
Models Tested
26.1%
Success Rate
5m 38s
Avg Duration
3m 45s - 10m 0s
Duration Range

Details

Score Model Duration Session (KB) test_dangling_cstr.sh test_init_order.sh test_int_overflow.sh test_iterator_invalidation.sh test_off_by_one.sh test_reference_to_temporary.sh test_unsigned_underflow.sh test_virtual_destructor.sh
100.0% openrouter/openai/gpt-5 5m 27s 375.7
100.0% openrouter/qwen/qwen3-coder 7m 35s 284.9
100.0% openrouter/anthropic/claude-3.5-sonnet 6m 5s 475.6
100.0% openrouter/anthropic/claude-haiku-4.5 4m 49s 271.2
100.0% openrouter/deepseek/deepseek-v3.1-terminus 6m 18s 346.0
100.0% openrouter/anthropic/claude-sonnet-4.5 4m 40s 166.9
87.5% openrouter/google/gemini-2.5-pro 5m 49s 82.7
87.5% openrouter/anthropic/claude-3.7-sonnet 5m 47s 397.3
87.5% openrouter/openai/gpt-5-mini 6m 8s 551.7
87.5% openrouter/anthropic/claude-3.5-haiku 4m 27s 219.3
87.5% openrouter/anthropic/claude-sonnet-4 7m 35s 555.8
87.5% openrouter/openai/gpt-4.1-mini 4m 32s 293.6
62.5% openrouter/x-ai/grok-3-mini 4m 39s 1034.8
50.0% openrouter/openai/gpt-4o-mini 4m 9s 343.0
37.5% openrouter/anthropic/claude-3-haiku 4m 46s 142.8
25.0% openrouter/google/gemini-2.5-flash-preview-09-2025 4m 0s 16.1
25.0% openrouter/openai/gpt-oss-120b 5m 29s 51.1
25.0% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 3m 55s 13.7
25.0% openrouter/openai/gpt-oss-20b 5m 31s 16.4
25.0% openrouter/deepseek/deepseek-chat-v3-0324 3m 45s 81.9
25.0% openrouter/openai/gpt-4.1-nano 4m 7s 88.5
0.0% openrouter/openai/gpt-5-nano 10m 0s 0.0
0.0% litellm/GLM-4.5-Air-FP8-dev 10m 0s 242.9