This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Force array coercion in c_get_string


On 4/25/19 9:05 PM, Tom Tromey wrote:

>The actual patch is somewhat more
>     complicated than you might think, because the caller can request more
>     array elements than the type allows.  This is normal when the type is
>     using the C struct hack.

Which test exposes this issue?

I'm a bit confused here.  If we ever coerce an array and then read more
elements than the type allows, won't we be reading garbage passed the
coerced array elements?

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]