[Libwebsockets] assert in lib/pollfd.c

fx IWATA NOBUO Nobuo.Iwata at fujixerox.co.jp
Wed Mar 2 03:10:21 CET 2016


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.

Thanks,

nobuo iwata
//


More information about the Libwebsockets mailing list