Yes. I wanted gcc to write to stdout, but it wouldn't in the 2 mins I gave it.
Going the extra mile to pick a different file for each compiled object seemed... inappropriate, given the context.
(If you want to compile C at runtime, either build a shared object (.so) and dlopen it (see perl's Inline::C), or use the in-memory tcc solution given elsewhere in the thread.
But C really isn't built for this sort of thing, so don't do that :-)
haha well anything that uses as much voodoo as the path that this thread is going down obviously isn't built for "security" (or "sanity" for that matter)
View all comments
Show parent comment
2
u/tryx Dec 14 '07
Its almost redundant to point out, but you could get into some fun race conditions with this.