[tor-dev] [GSoC] [Stegotorus] Pencil down

Zack Weinberg zackw at panix.com
Thu Aug 23 18:41:07 UTC 2012


On Mon, Aug 20, 2012 at 12:00 PM, vmon <vmonmoonshine at gmail.com> wrote:
> Hey Zack,
>
> I just did my last pushes before putting my pencil down for the final
> evaluations. They take care of the followings:
>
> - The remaining of all your comments on the
> github. Except for "always use xalloc instead of new". I have used new extensively for instantiating objects. What's exactly about xalloc
> that's better than new, if you have overloaded both of them?

new can throw exceptions; at present we can't let that happen.  (This
is the case _even if_ you have overloaded operator new with
allocate-or-crash behavior, as we have.)  However, we are doing other
things which are only okay on the assumption that exceptions will not
actually occur (e.g. blithe use of STL containers) so let's not worry
about it; go ahead and use 'new' for anything which has a constructor.
 I still prefer 'xmalloc' for plain data.

(If you want to start converting bare allocations to smart pointers,
by the way, go right ahead -- just don't do that for any libevent
objects; I've got a half-written C++ wrapper for libevent that will
take care of that en masse and also make us exception-safe.)

> The tl_oneway_c2s fails the http-proxy test. It still have problem
> with one-sided EOF. It used to pass when I allow the one way socket
> shutdown in the http proxy. So, I think stegotorus still have problem
> with EOF management. You might want to look at it when you have time.

Blistering barnacles.  Yeah, I'll look at it.  Eventually.  I am so
tired of EOF bugs.

zw


More information about the tor-dev mailing list