Fix a buglet in malloc/mtrace.pl
Commit Message
On Fri, Aug 14, 2015 at 12:31 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Paul Pluzhnikov <ppluzhnikov@gmail.com> writes:
>
>> - } else {
>> + } elsif ($allocaddr != "(nil}") {
>
> Can this ever be false?
Oops. You are almost right: the condition above is actually never
false (my Perl is getting rusty, one does not simply compare strings
with != in Perl!).
The end result is that all leak detection is suppressed :-(
Corrected patch attached.
Comments
On Fri, Aug 14, 2015 at 8:00 AM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> On Fri, Aug 14, 2015 at 12:31 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Paul Pluzhnikov <ppluzhnikov@gmail.com> writes:
>>
>
>>> - } else {
>>> + } elsif ($allocaddr != "(nil}") {
>>
>> Can this ever be false?
>
> Oops. You are almost right: the condition above is actually never
> false (my Perl is getting rusty, one does not simply compare strings
> with != in Perl!).
> The end result is that all leak detection is suppressed :-(
>
> Corrected patch attached.
Ping?
This buglet prevents me from committing fix for BZ #18757.
Thanks,
On Tue, Aug 18, 2015 at 5:42 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> Ping?
Ping x2?
> This buglet prevents me from committing fix for BZ #18757.
Thanks,
@@ -167,7 +167,7 @@ while (<DATA>) {
printf ("+ %#0@XXX@x Alloc %d duplicate: %s %s\n",
hex($allocaddr), $nr, &location($addrwas{$allocaddr}),
$where);
- } else {
+ } elsif ($allocaddr =~ /^0x/) {
$allocated{$allocaddr}=$howmuch;
$addrwas{$allocaddr}=$where;
}