Hi, Tom, Thanks a lot for the comments.
It’s good to hear that this new attribute might be able to be used to help gdb. We might spend some time to study to use this information in other consumers, for example, gdb, in the future, if necessary and possible. If you have good examples to show the importance of using such information in gdb, please let me know. I’m glad to study a little more. At this time, I agree with Kees, it’s better for the initial patches of the “counted-by” support to focus on the the attribute itself and the immediate security consumers, such as array bound sanitizer and dynamic object size, etc. So, let’s delay the possible support to gdb in a later patch. Does this sound reasonable to you? Qing > On Mar 29, 2024, at 15:16, Kees Cook <keesc...@chromium.org> wrote: > > On Fri, Mar 29, 2024 at 12:09:15PM -0600, Tom Tromey wrote: >>>>>>> Qing Zhao <qing.z...@oracle.com> writes: >> >>> This is the 8th version of the patch. >> >>> compare with the 7th version, the difference are: >> >> [...] >> >> Hi. I was curious to know if the information supplied by this attribute >> shows up in the DWARF. It would be good if it did, because that would >> let gdb correctly print these arrays without user intervention. > > Does DWARF have such an annotation? Regardless, I think this could be a > future patch to not hold up landing the initial feature. > > -- > Kees Cook