julia
34a8ee66 - Don't interpolate stdout in printf macro to avoid precompilation issues

Commit
5 years ago
Don't interpolate stdout in printf macro to avoid precompilation issues Fixes #37665. The subtle issue here was the at-printf macro using the `stdout` variable at _macro-expansion-time_ and interpolating it into the final `Printf.format` expanded call. If `stdout` was rebound between expansion time and usage time, then we saw ugly libuv errors (segfaults). This would happen mainly when a `Printf.@printf` call was precompiled directly, so the macro expansion was precompiled and led to the messed up `stdout` usage at runtime. The fix is to just not interpolate `stdout` at macro-expansion time, but have the expanded call use the global `stdout` at runtime.
Author
Parents
Loading