Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't truncate Memory when turning it into a String #54438

Conversation

oscardssmith
Copy link
Member

This was part of the triage decision on String(::Memory) being unsound.

@oscardssmith oscardssmith requested review from vtjnash and jakobnissen and removed request for vtjnash May 10, 2024 19:38
jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 10, 2024
This commit builds upon JuliaLang#54438, re-using the old String(::Vector{UInt8}) impl,
which now no longer truncates.
Also remove takestring!(::Memory) - that function probably should not be defined
Copy link
Contributor

@jakobnissen jakobnissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but I'm not familiar with C so my thumbs up perhaps doesn't mean that much :)

jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 10, 2024
@jakobnissen
Copy link
Contributor

As we discussed, I've folded the changes in this PR into #54372

jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 10, 2024
This commit builds upon JuliaLang#54438, re-using the old String(::Vector{UInt8}) impl,
which now no longer truncates.
Also remove takestring!(::Memory) - that function probably should not be defined
jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 10, 2024
@giordano
Copy link
Contributor

Probably needs some tests?

jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 13, 2024
This commit builds upon JuliaLang#54438, re-using the old String(::Vector{UInt8}) impl,
which now no longer truncates.
Also remove takestring!(::Memory) - that function probably should not be defined
jakobnissen added a commit to jakobnissen/julia that referenced this pull request May 13, 2024
@jakobnissen
Copy link
Contributor

I'm going to close this in favor of #54372

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.

None yet

3 participants