facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
885 stars 123 forks source link

Refactored CVE-2007-4559 Patch #774

Closed ChrisCummins closed 1 year ago

ChrisCummins commented 1 year ago

This refactors #769 to comply with this project's code style and to de-duplicate the code. Credit @TrellixVulnTeam for the original patch.

codecov-commenter commented 1 year ago

Codecov Report

Merging #774 (fe1cf21) into development (72fb339) will decrease coverage by 0.11%. The diff coverage is 93.33%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/graphs/tree.svg?width=650&height=150&src=pr&token=2C4Q4HC12K&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch)](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) ```diff @@ Coverage Diff @@ ## development #774 +/- ## =============================================== - Coverage 80.46% 80.34% -0.12% =============================================== Files 131 131 Lines 7995 8008 +13 =============================================== + Hits 6433 6434 +1 - Misses 1562 1574 +12 ``` | [Impacted Files](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) | Coverage Δ | | |---|---|---| | [compiler\_gym/util/filesystem.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmlsZXN5c3RlbS5weQ==) | `93.33% <90.90%> (-1.41%)` | :arrow_down: | | [compiler\_gym/envs/llvm/datasets/cbench.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL2VudnMvbGx2bS9kYXRhc2V0cy9jYmVuY2gucHk=) | `79.78% <100.00%> (+5.76%)` | :arrow_up: | | [compiler\_gym/third\_party/llvm/\_\_init\_\_.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3RoaXJkX3BhcnR5L2xsdm0vX19pbml0X18ucHk=) | `93.33% <100.00%> (+5.19%)` | :arrow_up: | | [compiler\_gym/util/logging.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvbG9nZ2luZy5weQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/util/flags/seed.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmxhZ3Mvc2VlZC5weQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/util/flags/episodes.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmxhZ3MvZXBpc29kZXMucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/util/flags/output\_dir.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmxhZ3Mvb3V0cHV0X2Rpci5weQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/util/flags/learning\_rate.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmxhZ3MvbGVhcm5pbmdfcmF0ZS5weQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/util/flags/episode\_length.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL3V0aWwvZmxhZ3MvZXBpc29kZV9sZW5ndGgucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [compiler\_gym/envs/gcc/service/gcc\_service.py](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-Y29tcGlsZXJfZ3ltL2VudnMvZ2NjL3NlcnZpY2UvZ2NjX3NlcnZpY2UucHk=) | `0.00% <0.00%> (-95.61%)` | :arrow_down: | | ... and [40 more](https://codecov.io/gh/facebookresearch/CompilerGym/pull/774/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) | |