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

memory usage error #2951

Open
BeneficialCode opened this issue Jan 3, 2023 · 0 comments
Open

memory usage error #2951

BeneficialCode opened this issue Jan 3, 2023 · 0 comments

Comments

@BeneficialCode
Copy link

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

v3.3.5

What operating system are you using?

Windows 10 21H2

What did you do?

I read the code.

What did you expect to see?

The correct code.

What did you see instead?

The error code.

What is your config in detail (with all sensitive info masked)?

LIB_ONLY

Issue:
When use ss-local as LIB_ONLY. The _start_ss_local_server's local variable struct sockaddr_storage storage is a stack variable. But it pass into the init_udprelay. So when we close gracefully, it will call the free_udprelay. This function will free the server_ctx->remote_addr. You know, this is not a heap variable. This is the problem. We should use ss_malloc to allocate the storage variable.

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

1 participant