[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



On Mon, Aug 20, 2012 at 12:00 PM, vmon <vmonmoonshine@xxxxxxxxx> 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
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev