Cap PhysicsWorld.numThreads to prevent thread-exhaustion DoS


A positive value reaches PxDefaultCpuDispatcherCreate(), which spawns
exactly that many OS threads with no validation of its own, checked
build or not -- an unbounded value (e.g. numThreads: 1000000) is a
straightforward thread-exhaustion DoS. Clamped to a generous but
bounded maximum of 256.

Pick-to: 6.12 6.11 6.8
Change-Id: I3a9f6e2c8b1d4f7a0e5c9b6d3f8a1c4e7b2d5f9a
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
commit1bca988fcd6c00ecc5d26f362f5b07199e4ec21d
parent357699e54573fd48adf9d5f62d56beb4a5304b69
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeTue, 25 Aug 2026 07:32:10 +0000