Repository navigation
fix(runtime): quote printable binaries with ~p - #96
Merged
Merged
Conversation
Plain ~p shows readable binaries as quoted text, alone and inside lists and tuples. Empty binaries and binaries with unreadable bytes or partial bytes print as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Native Erlang showed numbers for readable binaries where BEAM, Erlang’s usual runtime, showed quoted text.
What changed
Before and after
Before: The three calls showed the numbers 97, 98 and 99 instead of the text abc.
After: The three calls show the quoted text abc, just as BEAM does.
Native output for a binary alone, in a list and in a tuple
Checked
Live validation: Demonstrated for this version. 2 of 2 scenarios driven live in the product.
How it was checked
The shared regression failed on the original native runtime. It passed with the fix and on BEAM.
A Rust negative control returned numeric output and failed the exact assertion for quoted output.
An unchanged storage test failed with an inherited group-write permission mask on the original code and the changed code; both passed under the standard mask.
Risk
Risk: low in every dimension.
Full risk assessment
Not done
Merge approval queues this change for the next batch. The batch must pass its checks before it merges.