Skip to content

String.index_from (among others) is unsafe #173

@v-gb

Description

@v-gb

This segfaults:

let _ = ignore (Base.String.index_from "" (-1000000000) 'c' : _ option)

Most other String.*index* functions are broken in this way, and also by accepting indices greater than the length of the string, whereas String.{r,}index_from_exn detect both kinds of bad inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    forwarded-to-js-devsThis report has been forwarded to Jane Street's internal review system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions