Skip to content

String::from_utf8_lossy performs an infallible allocation for invalid input, so allocation failure aborts the host process instead of being returned through this bool/error API. The previous C FFI conversion deliberately used the fallible try_from_utf8_lossy helper in libdd-profiling-ffi/src/profiles/utf8.rs. #2550

Open

Description

@danielsn

String::from_utf8_lossy performs an infallible allocation for invalid input, so allocation failure aborts the host process instead of being returned through this bool/error API. The previous C FFI conversion deliberately used the fallible try_from_utf8_lossy helper in libdd-profiling-ffi/src/profiles/utf8.rs.

Please preserve that behavior by moving or sharing a fallible lossy-conversion helper in libdd-profiling, and use it here and in the dictionary-label conversion path.

Originally posted by @taegyunkim in #2497 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions