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

Crash in copy_string #7835

Open
lunatichai opened this issue Jan 28, 2025 · 5 comments
Open

Crash in copy_string #7835

lunatichai opened this issue Jan 28, 2025 · 5 comments

Comments

@lunatichai
Copy link

Windows 11 x64
libtorrent 2.0.10
msvc2019

Crashed in copy_string() because m_storage size too much.

Image

Image

Image

@arvidn
Copy link
Owner

arvidn commented Jan 30, 2025

What's the size of the vector?
Do you restrict the alert queue size?
Do you pop alerts regularly?

@lunatichai
Copy link
Author

On a first screenshow you can see size 2147483637
Yes lt::settings_pack::alert_queue_size, std::numeric_limits::max() / 2
Yes

@arvidn
Copy link
Owner

arvidn commented Feb 1, 2025

numeric_limits is a template. Is that a limit of 2 billions or 4 quintillions?

Either way, it's probably going to make you run out of memory

@lunatichai
Copy link
Author

lunatichai commented Feb 1, 2025

limit is int (i paste std::numeric_limits< int >::max() but in comment showed only std::numeric_limits::max())
memory 16gb

@arvidn
Copy link
Owner

arvidn commented Feb 1, 2025

1 billion alerts will make you run out of memory unless you pop them at a higher rate than they're produced. I imagine you're not doing that.

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