Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream.c assert "suggested_size <= sizeof(slab)" run on windows #46

Closed
richmonkey opened this issue Nov 14, 2012 · 8 comments
Closed

stream.c assert "suggested_size <= sizeof(slab)" run on windows #46

richmonkey opened this issue Nov 14, 2012 · 8 comments

Comments

@richmonkey
Copy link

No description provided.

@richmonkey
Copy link
Author

I suggest erase the assert

@saghul
Copy link
Owner

saghul commented Nov 14, 2012

Asserts are there for a reason. What is the value of suggested_size, when it blows up?

@richmonkey
Copy link
Author

More than 10 people run the app, i can't catch the exact assert backstrace

@saghul
Copy link
Owner

saghul commented Nov 14, 2012

Well, I don't like to blindly change the code before understanding what is going on, it could be a side effect and removing that assert would mask a bigger issue.

@saghul
Copy link
Owner

saghul commented Nov 14, 2012

I see a single code path which uses a variable for the suggested size, I'll investigate later today.

@saghul saghul closed this as completed in f57bc6e Nov 14, 2012
@saghul
Copy link
Owner

saghul commented Nov 14, 2012

I checked with the libuv guys and under certain conditions the value can get bigger on Windows, so I removed the assert. The buffer is capped at 64K, but that's fine because libuv deals with it properly.

Thanks for the report!

@richmonkey
Copy link
Author

TCP or PIPE ? or both? can you give me a link that talk about the problem ?

@saghul
Copy link
Owner

saghul commented Nov 15, 2012

Both TCP and Pipe handles use on_stream_alloc, so the change applies to both. This is the code path that could lead to a big suggested_size: https://github.com/joyent/libuv/blob/master/src/win/pipe.c#L1374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants