[PATCH] weston: Don't ask for EGL depth buffer if not needed

Kristian Hoegsberg hoegsberg at gmail.com
Thu Mar 22 09:31:02 PDT 2012


On Thu, Mar 22, 2012 at 02:59:32AM -0700, Bill Spitzak wrote:
> On 03/22/2012 01:43 AM, Pekka Paalanen wrote:
> 
> >>PS: I have not heard anything about my changes to wayland (there are 5
> >>patches). One of them fixed a major bug for me. I believe my EAGAIN
> >>changes are a mistake and should be ignored, but the other changes are
> >>still legit imho. Sorry also that I submitted the patches multiple times
> >>in different arrangements. You should look at the *last* patches I
> >>submitted (the ones in a range 1/5) and ignore the earlier ones.
> >
> >You have at least 3 patches applied with your name in the git repos.
> 
> The one I am asking about is this, which fixed a real bug for me
> that caused the terminal to crash after about 12 keystrokes. It
> seems some minor changes I sent are getting pushed and commented on,
> while this major one is ignored:

It's not getting ignored, it's on my list.  I read the thread and
obviously there's a serious bug in connection.c that you and others
are hitting (and I think I've seen it myself).  This just can't be the
right fix.  If you're just typing into the terminal, there's no way
the protocol buffer would fill up before we send it so you're not
hitting this case.  Also, we don't flush the data without also sending
the fds, so you won't get into a case where there are fds left but no
data in the buffer.  And if that happened, the fix isn't to send an
empty data buffer with the fds, as that doesn't work, there always has
to be a regular data payload (as I'm writing this, I can't actually
find a man page that states this...).

Anyway, I'll take a look and see if I can reproduce it.  If you can
post a full backtrace and maybe try to valgrind it, that would be
helpful.

thanks,
Kristian

> connection.c sent a 4096 byte block of garbage if it wanted to send an
> fd and there happened to be zero data to send as well.
> ---
>  src/connection.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/connection.c b/src/connection.c
> index fa01545..1f707ed 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -124,6 +124,10 @@ wl_buffer_get_iov(struct wl_buffer *b, struct
> iovec *iov, int *count)
>  {
>  	int head, tail;
> 
> +	if (b->head == b->tail) {
> +		*count = 0;
> +		return;
> +	}
>  	head = MASK(b->head);
>  	tail = MASK(b->tail);
>  	if (tail < head) {
> -- 1.7.4.1


More information about the wayland-devel mailing list