crater
crater copied to clipboard
Crates which create files in build scripts can't be cargobombed
For instance any crate using LALRPOP needs to generate a .rs file from the grammar file but due to the file system being read-only.
At minimum we should allow (say) 100MB in /tmp.
At minimum we should allow (say) 100MB in /tmp.
In the case of LALRPOP it needs access to write into the source directory as it is an actual source file that gets created which rustc compiles afterwards.
Got a link? Usually if you're generating source files you can use OUT_DIR to not pollute your source dir, e.g. https://github.com/sfackler/rust-phf#phf_codegen
(was also talking about this to @tglman who creates temporary databases for testing)
That's true, currently I just .gitignore it so I never see it but generating to OUT_DIR and including it is probably a better idea. I could just add a dummy grammar.rs module in this case whose sole contents is a include! call.
https://github.com/gluon-lang/gluon/blob/master/parser/build.rs
I assume cargobomb will work in that case?, as OUT_DIR is a place which must be writable for any compilation to work at all?
I assume cargobomb will work in that case?, as OUT_DIR is a place which must be writable for any compilation to work at all?
Yup, OUT_DIR is under target so should work.