Don't use new to allocate StringSet#866
Conversation
|
lgtm, seems like cleaner code this way anyhow. But that sounds like a compiler bug if it wasn't constructing the static variable properly. Just out of curiosity, which compiler was it with? |
|
I'm not completely sure which one the build system picked up, but it was probably either |
|
It looks like asan is reporting memory leaks with this new change. I'm not sure why this should be worse, because the old version had absolutely no way to ever free the |
|
It's possible the change makes ASan capable of finding more leaks, because the leaks seem to be a bunch of strings, and not the StringSet itself. See the |
|
Is this still active, or should we close it? |
|
We might as well close it. I tried a few ways to fix the leaks, but that just exposed more of the problems I was trying to avoid and I got distracted. It'll be easy enough to revisit in the future if needed. |
For some reason the call to
newwas not running in mir2wasm's initialization on my machine, leading to segfaults. This change allows things to run correctly for me.