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
8m 8s
Avg Duration
5m 47s - 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/google/gemini-2.5-pro 9m 20s 106.1
100.0% openrouter/openai/gpt-4o-mini 9m 11s 459.3
100.0% openrouter/anthropic/claude-3.7-sonnet 8m 30s 382.4
100.0% openrouter/anthropic/claude-haiku-4.5 8m 43s 404.7
100.0% openrouter/openai/gpt-5-mini 8m 15s 558.4
100.0% openrouter/anthropic/claude-sonnet-4 9m 3s 440.2
87.5% openrouter/anthropic/claude-3.5-sonnet 8m 46s 426.6
87.5% litellm/GLM-4.5-Air-FP8-dev 9m 33s 298.7
87.5% openrouter/anthropic/claude-sonnet-4.5 7m 58s 325.5
87.5% openrouter/anthropic/claude-3.5-haiku 8m 43s 270.6
87.5% openrouter/openai/gpt-4.1-mini 8m 4s 512.7
37.5% openrouter/anthropic/claude-3-haiku 6m 53s 197.0
37.5% openrouter/x-ai/grok-3-mini 6m 11s 560.1
25.0% openrouter/google/gemini-2.5-flash-preview-09-2025 6m 18s 18.0
25.0% openrouter/openai/gpt-oss-120b 7m 5s 211.0
25.0% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 5m 47s 19.7
25.0% openrouter/openai/gpt-oss-20b 7m 5s 19.4
25.0% openrouter/deepseek/deepseek-chat-v3-0324 6m 4s 72.5
25.0% openrouter/openai/gpt-4.1-nano 7m 10s 80.8
12.5% openrouter/openai/gpt-5-nano 8m 18s 725.7
0.0% openrouter/openai/gpt-5 10m 0s 888.6
0.0% openrouter/qwen/qwen3-coder 10m 0s 207.5
0.0% openrouter/deepseek/deepseek-v3.1-terminus 10m 0s 254.5