Re: [DTrace-devel] [PATCH v2] string: ensure string size is handled correctly
Eugene Loh <[email protected]>
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
Typo: s/strsuze/strsize/ For tracking purposes, should this patch be prefaced 5/5? I think the .r files need to be updated for test/unittest/codegen/tst.str_const_length.r - 0: 61 62 63 64 65 00 abcde. + 0: 61 62 63 64 00 abcd. test/unittest/codegen/tst.str_data_size.r - 0: 64 74 72 61 63 00 dtrac. + 0: 64 74 72 61 00 dtra. test/unittest/variables/tvar/tst.str-size.r -abcdabcdabcd +abcabcabc Also, need to check test/unittest/funcs/strlen/tst.capped-sizw.d. On 8/13/25 23:57, Kris Van Hees via DTrace-devel wrote: > A string is defined as a character array of size strsize. Strings > that are less that strsize in length are terminated by a NUL byte. > This implies that the NUL byte is part of the array and therefore, > strsuze is indeed the size of the array and not the maximum number > of characters in the string.