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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 1 11:02:25 UTC 2022


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

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/druntime pull request #3793 "merge stable" was merged into master:

- 84e429a7c7c99ebae6e72de2f2be3069266394a5 by MoonlightSentinel:
  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 uses `fwrite` instead
  which doesn't stop at `\0` and (theoretically) supports lengths up to
  `size_t.max`

- 13441f120f669571c5941c5cef3196e7fd9d3a95 by Razvan Nitu:
  Merge pull request #3787 from MoonlightSentinel/truncated-exception-message

  Fix 20778 - Ensure that _d_print_throwable prints the entire message

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

--


More information about the Digitalmars-d-bugs mailing list