runtime, cmd/compile: implicit allocations allowed in the runtime #42158
We have a test in the compiler that ensures that we don't have any implicit allocations in the runtime. We want all allocations that the runtime does to be explicit (to avoid things like self-deadlock when allocating inside malloc).
I hacked a simple test into the compiler, and found a bunch of situations where this implicit allocation happens. An example:
This code needs to allocate a
I ran into this issue in a CL I'm working on where implicit allocations were happening in a bad place, and it took me a while to track it down. It would have been much easier for the compiler to give me an error.
The text was updated successfully, but these errors were encountered: