Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize dt_cg_store_val() for string values
The dt_cg_store_val() implementation was doing more than just copying a value to the output buffer when dealing with strings. It was checking the size of the string to ensure that it was not beyond the maximum string size, and if it was, it would truncate the string. That turns out to pose issues because it hides the fact that some of the string handling code was not ensuring that strings were stored with the correct string length. It also hid the fact that string constants can be longer than the maximum string length, and therefore atring functions were being presented with strings of an unacceptable length. This patch causes several tests in the testsuite to fail. This is expected behaviour and will require bugfix patches to string handling code to ensure that all strings used in D code have a length that is the maximum string length or less. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
- Loading branch information