Migrated from https://git2.unturf.com/engineering/java-topology.git
Defect: projectile.cpp line 872, std::find on std::vector<BASE_OBJECT*> psDamaged inside grid neighbor iteration loop. Every projectile tick, for each nearby object, does O(D) linear scan to check if already damaged. Penetrating weapons inherit and grow psDamaged across hits. Fix: replace std::vector with std::unordered_set for O(1) lookup. push_back becomes insert, std::find becomes count, remove_if becomes iterator-based erase loop. Severity: MEDIUM. Hot path (per projectile per tick), scales with battle density. D=200 damaged, G=100 grid neighbors: 9.5x speedup. MOAD 0002-0005 CLEAN: - 0002: global state is architectural (Eidos-era C game), not coupling defect - 0003: no thread_local usage found - 0004: no secrets logged (public keys and IPs only, standard for server logs) - 0005: no unsynchronized cache patterns (game logic is single-threaded) |
||
|---|---|---|
| .github | ||
| .jcheck | ||
| bin | ||
| defects | ||
| doc | ||
| docs | ||
| make | ||
| scanner | ||
| src | ||
| test | ||
| tests | ||
| tools | ||
| whitepaper | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| ADDITIONAL_LICENSE_INFO | ||
| ASSEMBLY_EXCEPTION | ||
| CLAUDE.md | ||
| compile-unit-tests.sh | ||
| configure | ||
| CONTRIBUTING.md | ||
| GNUmakefile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| SECURITY.md | ||
| UNDF-REGISTRY.json | ||
Welcome to the JDK!
For build instructions please see the online documentation, or either of these files:
- doc/building.html (html version)
- doc/building.md (markdown version)
See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.