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

[BUG]: Fix receiver buffer realloc issue #14

Open
okawo80085 opened this issue Apr 1, 2022 · 4 comments · Fixed by HoboVR-Labs/lazy-sockets#1
Open

[BUG]: Fix receiver buffer realloc issue #14

okawo80085 opened this issue Apr 1, 2022 · 4 comments · Fixed by HoboVR-Labs/lazy-sockets#1
Labels
bug Something isn't working driver madness next Intended for the next driver madness window lazy-sockets Related to `lazy-sockets` leaky pipes Something is leaking :)

Comments

@okawo80085
Copy link
Member

okawo80085 commented Apr 1, 2022

Our lazy-socket receiver class has an issue with it's internal receive buffer where it can smash heap after a realloc, because right now it's done with an almost raw buffer by calling realloc().
Switching to one of the STL containers for managing memory will be ideal.

@okawo80085 okawo80085 changed the title [BUG]: Fix receiver buffer realloc issue, ideally switch to some STL container for managing memory [BUG]: Fix receiver buffer realloc issue Apr 1, 2022
@okawo80085 okawo80085 added bug Something isn't working lazy-sockets Related to `lazy-sockets` labels Apr 1, 2022
@okawo80085
Copy link
Member Author

Scratch that, its not smashing the heap, it's just leaking memory x)

@okawo80085
Copy link
Member Author

Note: this was just a memory leak fix, it is not using an STL container internally yet.

@okawo80085
Copy link
Member Author

Weeeeeeeeeeeeeeeeeeeeeeeeell, turns out that temporary fix results in a segfault in runtime of our driver (which was a real pain to find :L )

@okawo80085 okawo80085 reopened this May 1, 2022
@okawo80085
Copy link
Member Author

So yeah, time to make a proper fix and use an STL container for buffer management instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working driver madness next Intended for the next driver madness window lazy-sockets Related to `lazy-sockets` leaky pipes Something is leaking :)
1 participant