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

[dmd-cxx] add OutBuffer.print() #12174

Merged
merged 1 commit into from
Feb 1, 2021
Merged

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 1, 2021

Backported from #7366.

The use of printf in dmangle.c has an overflow bug where 0x8000000000000000 is formatted as N-9223372036854775808 instead of N9223372036854775808. This was also present in the D implementation until it was accidentally fixed by Walter.

@ibuclaw ibuclaw added GDC Gnu D Compiler Bug Fix C++ Port labels Feb 1, 2021
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "dmd-cxx + dmd#12174"

@dlang-bot dlang-bot merged commit 5e2a81d into dlang:dmd-cxx Feb 1, 2021
@ibuclaw ibuclaw deleted the dmd-cxx-print branch February 1, 2021 23:31
jpf91 pushed a commit to D-Programming-GDC/gcc that referenced this pull request Feb 2, 2021
This adds a special formatter to OutBuffer to handle formatted printing
of integers, a common case.  The replacement is faster and safer.

In dmangle.c, it also gets rid of a number of problematic casts, as seen
on powerpc64 targets.

Reviewed-on: dlang/dmd#12174

gcc/d/ChangeLog:

	PR d/98921
	* dmd/MERGE: Merge upstream dmd 5e2a81d9c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants