Skip to content

Add constructor for UnicodeIdentificationMetadata#3746

Open
mjkoo wants to merge 1 commit intoAFLplusplus:mainfrom
mjkoo:constructable-unicode-metadata
Open

Add constructor for UnicodeIdentificationMetadata#3746
mjkoo wants to merge 1 commit intoAFLplusplus:mainfrom
mjkoo:constructable-unicode-metadata

Conversation

@mjkoo
Copy link

@mjkoo mjkoo commented Mar 6, 2026

Description

The four provided Unicode mutators are public, but are effectively unusable outside of the libafl crate due to extract_metadata being pub(crate) and UnicodeIdentificationMetadata not having a public constructor. This makes it convoluted/impossible (outside of a deserialize hack) to construct a non-empty UnicodeIdentificationMetadata which short-circuits the mutations.

This PR adds UnicodeIdentificationMetadata::new as a constructor wrapping the extract_metadata functionality (moved to a private extract_ranges helper), and updates internal callers to use the public constructor.

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

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