Skip to content

fix: reject timed-out block-mask parses - #3621

Closed
twme-ai wants to merge 1 commit into
IntellectualSites:mainfrom
twme-ai:fix/block-mask-parse-timeout
Closed

fix: reject timed-out block-mask parses#3621
twme-ai wants to merge 1 commit into
IntellectualSites:mainfrom
twme-ai:fix/block-mask-parse-timeout

Conversation

@twme-ai

@twme-ai twme-ai commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Reject block-mask parses that do not finish within the existing 5 ms budget.

Problem

BlockMaskBuilder.addRegex() previously ignored both timeout and interruption
from its parsing future. The method then returned a partially constructed mask
as if parsing had succeeded. In practice, an invalid //gmask input could be
reported as a successfully set global mask.

The parser now turns timeout, interruption, and unexpected worker failures
into InputParseException, cancels timed-out work, and stops the executor
immediately. Existing InputParseException failures are preserved.

Testing

env JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64 \
  ./gradlew -Dorg.gradle.configureondemand=false \
  :worldedit-core:test \
  --tests com.fastasyncworldedit.core.function.mask.BlockMaskBuilderTest \
  --no-daemon

@twme-ai
twme-ai requested a review from a team as a code owner August 11, 2026 11:22
@twme-ai twme-ai closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant