[tor-bugs] #24423 [Core Tor/Tor]: Fix STACK warnings in Tor
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Dec 14 20:40:50 UTC 2017
#24423: Fix STACK warnings in Tor
-----------------------------+------------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: needs_review
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: review-group-27 | Actual Points:
Parent ID: | Points:
Reviewer: catalyst | Sponsor:
-----------------------------+------------------------------------
Comment (by catalyst):
Replying to [comment:22 gk]:
> Replying to [comment:21 nickm]:
> > I've tried the first approach you suggested, and didn't get
signed/unsigned warnings, so lt's try it out.
> >
> > gk, does my `stack_again_032` branch fix the warning for you?
>
> Looks good now. Just the warning in `test` is still there (see comment:4
and the respective attachment).
That looks like another instance of `tor_malloc_zero()` (called from
`new_fake_channel()`) always returning non-`NULL` (assuming the line
numbers on maint-0.3.2 are still correct), so this conditional in
`test_channel_flushmux()` is always true:
{{{
762 if (ch)
763 circuitmux_free(ch->cmux);
}}}
Even better, there's also
{{{
718 ch = new_fake_channel();
719 tt_assert(ch);
}}}
so that's another reason why it can't be `NULL`, along with other
unconditional dereferences.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24423#comment:23>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list