[Issue 20778] exception messages with nulls within are treated inconsistently

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 24 16:25:11 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=20778

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel updated dlang/druntime pull request #3787 "Fix 20778 -
Ensure that _d_print_throwable prints the entire message" fixing this issue:

- Fix 20778 - Ensure that  _d_print_throwable prints the entire message

  The previous implementation simply forwarded the pointer + length to
  `fprintf` and didn't check the return value. This caused the message to
  be truncated for the following cases:

  - it contains `\0` (the bug report)
  - the length is greater than `int.max`

  This commit changes the implementation s.t. it checks the character
  count written to `stderr` (the return value) and prints the remainder
  of the string if necessary.

https://github.com/dlang/druntime/pull/3787

--


More information about the Digitalmars-d-bugs mailing list