Skip to content

Fix C-strings usage.#73

Open
igankevich wants to merge 1 commit into
yobix-ai:mainfrom
igankevich:fix-vm-options
Open

Fix C-strings usage.#73
igankevich wants to merge 1 commit into
yobix-ai:mainfrom
igankevich:fix-vm-options

Conversation

@igankevich

Copy link
Copy Markdown

This PR fixes how options are passed to GraalVM. They should use NUL-terminated strings to not have memory issues. Without NULs it works accidentally, at least this is what I experienced when extracting large number of files.

Besides that PR replaces fixed-size Vec with an array to avoid memory allocation.

titusz added a commit to iscc/iscc-tika that referenced this pull request Mar 29, 2026
Use NUL-terminated C-string literals (c"...") instead of Rust str
pointers for JVM options. Without NUL terminators the strings worked
accidentally but could cause memory issues when processing large
numbers of files. Also replaces heap-allocated Vec with a stack array
and fixes the missing hyphen in "-Djava.awt.headless=true".

Based on: yobix-ai/extractous#73
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