[Libwebsockets] assert in lib/pollfd.c

Andy Green andy at warmcat.com
Wed Mar 2 03:12:40 CET 2016



On 03/02/2016 10:10 AM, fx IWATA NOBUO wrote:
> Hello,
>
> I'm testing a client program on Windows 7.
>
> int
> _lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
> {
> 	--- snip ---
>
> 	context = wsi->context;
> 	pt = &context->pt[(int)wsi->tsi];
> 	assert(wsi->position_in_fds_table >= 0 &&
> 	       wsi->position_in_fds_table < pt->fds_count);
>
> Assert statement above fails.
>
> Skipping the statement, the program works well.
>
> The call path is: lws_client_connect_via_info() > lws_allocate_header_table() > _lws_change_pollfd()
>
> It seems those fields checked by the assert may not setup at the point FIRST TIME.

Is this on current master or v1.7-stable (or tag "v1.7.3")?  It sounds 
similar to something fixed a few days ago.

-Andy

> Thanks,
>
> nobuo iwata
> //
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at libwebsockets.org
> http://libwebsockets.org/mailman/listinfo/libwebsockets
>



More information about the Libwebsockets mailing list