wee_alloc icon indicating copy to clipboard operation
wee_alloc copied to clipboard

Add ability to log allocations/frees for easily reporting bugs

Open fitzgen opened this issue 7 years ago • 4 comments

Summary

We would write all allocations and frees into a buffer that we periodically flush to a file. When people report a bug, they could enable this feature, and provide their log.

Motivation

Easier to file bugs. Easier to reproduce bugs. Therefore, easier to fix bugs.

Details

  • Behind a cargo feature.

  • I guess we could use std::io::BufWriter, and say that this feature requires std

  • Ideally this would use the same operation definitions in ./test, so we could trivially turn them into regression tests. Also, shrink them to get reduced test cases.

fitzgen avatar Feb 02 '18 18:02 fitzgen

I'm reading the source code more carefully to see if I can give this one a crack!

joaolucasl avatar Feb 09 '18 17:02 joaolucasl

@joaolucasl Awesome -- let me know if you have any questions!

fitzgen avatar Feb 09 '18 18:02 fitzgen

hi @fitzgen I would like to try this one. I don't know if this lib is still mantained and actively updated. Or there are any alternatives that made this lib obsolete. But if this lib is still up to date and you're mantaining it, I would like to help! And also learn, why not :sweat_smile:

I'm not sure whether @joaolucasl is still developing this. But I guess not. So if it's ok for you @fitzgen I'll give it a try!

CPerezz avatar Jan 30 '21 20:01 CPerezz

Go ahead @CPerezz, I tried at the time and after a while trying I just left it alone. If you want, feel free to give it a crack

joaolucasl avatar Feb 12 '21 14:02 joaolucasl