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

Fixed crash when stub with very long data and no delay for response #57

Closed
wants to merge 1 commit into from
Closed

Conversation

Pierre-Loup
Copy link
Contributor

Salut Olivier,

J'ai rencontré un crash en voulant faire un stub avec un gros fichier (environ 610ko).

Du coup j'ai corrigé la ligne ou le crash avait lieu : j'ai simplement utilisé un malloc plutôt qu'une allocation statique pour le buffer.

Je n'ai pas compris exactement pourquoi l'allocation statique faisait craché une ligne plus loin et encore moins pourquoi ça crash quand responseTime vaut 0s et pas quand responseTime vaut 5s.

Je t'ai rajouté un test case pour que tu puisses troubleshooter ça.

Bon weekend !

@AliSoftware
Copy link
Owner

Ok merci je regarde ça

Par contre un malloc c'est bien mais il faut le balancer avec un free (contrairement à une allocation statique qui se désalloue toute seule quand on sort du scope) sinon tu as une énorme fuite mémoire !

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

Successfully merging this pull request may close these issues.

None yet

2 participants