[tor-bugs] #19038 [Core Tor/Tor]: Test failure on the latest commit

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 12 11:05:19 UTC 2016


#19038: Test failure on the latest commit
--------------------------+----------------------------------
 Reporter:  cypherpunks   |          Owner:
     Type:  defect        |         Status:  needs_review
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:  Tor: unspecified
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+----------------------------------
Changes (by cypherpunks):

 * status:  new => needs_review


Comment:

 As suggested by another cypherpunk in ticket:18363#comment:29 the issue is
 caused by an incorrect memory allocation.

 {{{
 diff --git a/src/common/pubsub.c b/src/common/pubsub.c
 index 98ec3f8..b3faf40 100644
 --- a/src/common/pubsub.c
 +++ b/src/common/pubsub.c
 @@ -48,7 +48,7 @@ pubsub_subscribe_(pubsub_topic_t *topic,
    if (subscribe_flags & SUBSCRIBE_ATSTART) {
      tor_assert(topic->n_events_fired == 0);
    }
 -  pubsub_subscriber_t *r = tor_malloc_zero(sizeof(r));
 +  pubsub_subscriber_t *r = tor_malloc_zero(sizeof(*r));
    r->priority = priority;
    r->subscriber_flags = subscribe_flags;
    r->fn = fn;
 }}}

 This patch fixes the issue for me.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19038#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list