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
0.0%
Success Rate
9m 39s
Avg Duration
8m 49s - 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
62.5% openrouter/openai/gpt-4.1-mini 9m 51s 208.0
37.5% openrouter/qwen/qwen3-coder 8m 54s 38.5
37.5% openrouter/x-ai/grok-3-mini 9m 0s 505.4
25.0% openrouter/google/gemini-2.5-flash-preview-09-2025 9m 37s 14.0
25.0% openrouter/anthropic/claude-3-haiku 9m 26s 12.7
25.0% openrouter/openai/gpt-oss-120b 8m 55s 218.5
25.0% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 8m 51s 19.2
25.0% openrouter/openai/gpt-oss-20b 8m 50s 18.6
25.0% openrouter/openai/gpt-4.1-nano 8m 49s 60.4
0.0% openrouter/openai/gpt-5 10m 0s 0.0
0.0% openrouter/openai/gpt-5-nano 10m 0s 1013.9
0.0% openrouter/anthropic/claude-3.5-sonnet 10m 0s 0.0
0.0% openrouter/google/gemini-2.5-pro 10m 0s 89.0
0.0% openrouter/openai/gpt-4o-mini 10m 0s 347.4
0.0% openrouter/anthropic/claude-3.7-sonnet 10m 0s 462.2
0.0% openrouter/anthropic/claude-haiku-4.5 10m 0s 478.5
0.0% openrouter/deepseek/deepseek-v3.1-terminus 10m 0s 242.3
0.0% litellm/GLM-4.5-Air-FP8-dev 10m 0s 242.7
0.0% openrouter/anthropic/claude-sonnet-4.5 10m 0s 342.1
0.0% openrouter/deepseek/deepseek-chat-v3-0324 10m 0s 429.2
0.0% openrouter/openai/gpt-5-mini 10m 0s 0.0
0.0% openrouter/anthropic/claude-3.5-haiku 10m 0s 290.9
0.0% openrouter/anthropic/claude-sonnet-4 10m 0s 402.9