Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crates which create files in build scripts can't be cargobombed #157

Open
Marwes opened this issue Nov 22, 2017 · 5 comments
Open

Crates which create files in build scripts can't be cargobombed #157

Marwes opened this issue Nov 22, 2017 · 5 comments
Labels
A-sandbox Area: build sandbox

Comments

@Marwes
Copy link
Contributor

Marwes commented Nov 22, 2017

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.

@Marwes Marwes changed the title Crates which create files in build scripts canät Crates which create files in build scripts can't be cargobombed Nov 22, 2017
@aidanhs
Copy link
Member

aidanhs commented Nov 24, 2017

At minimum we should allow (say) 100MB in /tmp.

@Marwes
Copy link
Contributor Author

Marwes commented Nov 24, 2017

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.

@aidanhs
Copy link
Member

aidanhs commented Nov 24, 2017

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)

@Marwes
Copy link
Contributor Author

Marwes commented Nov 24, 2017

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?

@aidanhs
Copy link
Member

aidanhs commented Nov 24, 2017

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.

Marwes added a commit to Marwes/gluon that referenced this issue Nov 26, 2017
Should let gluon be ran under cargobomb rust-lang/crater#157 but I think that regardless of that it is better to generate files outside of the source tree
Marwes added a commit to Marwes/gluon that referenced this issue Nov 27, 2017
Should let gluon be ran under cargobomb rust-lang/crater#157 but I think that regardless of that it is better to generate files outside of the source tree
Marwes added a commit to Marwes/gluon that referenced this issue Nov 27, 2017
Should let gluon be ran under cargobomb rust-lang/crater#157 but I think that regardless of that it is better to generate files outside of the source tree
@pietroalbini pietroalbini added the A-sandbox Area: build sandbox label Jun 28, 2018
Marwes added a commit to Marwes/crater that referenced this issue Jan 28, 2019
I think gluon was blacklisted due the problem in rust-lang#157
but that has since been fixed in the crate itself so gluon now compiles
(verified by running crater locally).

Found because I started getting the warning from rust-lang/rust#57501 in gluon_vm.
bors added a commit that referenced this issue Jan 28, 2019
Re-add gluon* to the crater list

I think gluon was blacklisted due the problem in #157
but that has since been fixed in the crate itself so gluon now compiles
(verified by running crater locally).

Found because I started getting the warning from rust-lang/rust#57501 in gluon_vm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sandbox Area: build sandbox
Projects
None yet
Development

No branches or pull requests

3 participants