Skip to content

Fixed a memory safety bug in FastWordpieceTokenizer concerning StringVocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization.#1481

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_874751941
Feb 25, 2026

Conversation

@copybara-service
Copy link
Contributor

@copybara-service copybara-service bot commented Feb 24, 2026

Fixed a memory safety bug in FastWordpieceTokenizer concerning StringVocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization.

@copybara-service copybara-service bot changed the title Fixed memory safety bug in FastWordpieceTokenizer regarding StringVocab lifetime. Shifted to explicit lifetime management of the vocabulary object. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization. Fixed memory safety bug in FastWordpieceTokenizer regarding StringVocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization. Feb 24, 2026
@copybara-service copybara-service bot changed the title Fixed memory safety bug in FastWordpieceTokenizer regarding StringVocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization. Fixed a memory safety bug in FastWordpieceTokenizer concerning StringVocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization. Feb 24, 2026
@copybara-service copybara-service bot force-pushed the test_874751941 branch 3 times, most recently from 5c3079f to 9196b13 Compare February 25, 2026 01:01
…Vocab lifetime. This prevents temporary copies that were previously invalidating std::string_view references to internal vocabulary data, ensuring memory stability during tokenization.

PiperOrigin-RevId: 874855389
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