This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix use of uninitialized value in linux-arm-low in GDBServer.
- From: Pedro Alves <palves at redhat dot com>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>, Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Sep 2015 15:05:49 +0100
- Subject: Re: [PATCH] Fix use of uninitialized value in linux-arm-low in GDBServer.
- Authentication-results: sourceware.org; auth=none
- References: <1443115845-3044-1-git-send-email-antoine dot tremblay at ericsson dot com> <86si6292lt dot fsf at gmail dot com> <5605310C dot 8080004 at ericsson dot com> <56053310 dot 6060802 at ericsson dot com>
On 09/25/2015 12:42 PM, Antoine Tremblay wrote:
>
>
> On 09/25/2015 07:33 AM, Antoine Tremblay wrote:
>>
>>
>> On 09/25/2015 07:10 AM, Yao Qi wrote:
>>> Antoine Tremblay <antoine.tremblay@ericsson.com> writes:
>>>
>>>> In arm_breakpoint_at, an uninitialized unsigned long was used were only
>>>> 4 bytes would be written to the variable thus polluting the value on
>>>> 64bit.
>>>
>>> 'unsigned long' is 32-bit on arm. What problem do you want to fix?
>>>
>>
>> Won't this function be used if you're debugging an arm program on aarch64 ?
>>
> Looking at it more , I don't think so, sorry for the noise it just
> jumped to me as I was fixing a similar issue elsewhere.
>
Note that gnulib gives us stdint.h everywhere nowadays, so in these
cases the best/clearest would be to use uint32_t, etc.
Thanks,
Pedro Alves