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

executors/OBJC: fix executor #1158

Merged
merged 1 commit into from
Jan 15, 2024
Merged

executors/OBJC: fix executor #1158

merged 1 commit into from
Jan 15, 2024

Conversation

int-y1
Copy link
Contributor

@int-y1 int-y1 commented Jan 8, 2024

  • This executor calls prctl with 23.
  • This executor tries to traverse ~/GNUstep, but this directory doesn't exist. I did RecursiveDir('~') to work around this issue.
  • Apparently, initialize(cls) doesn't run. I wrote autoconfig(cls) to do the setup.
  • Afterwards, add apt-get install make gnustep-devel to the DMOJ dockerfile.

@dmoj-build
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (e51da7a) 82.99% compared to head (8aac5cd) 82.91%.
Report is 1 commits behind head on master.

Files Patch % Lines
dmoj/executors/OBJC.py 48.00% 13 Missing ⚠️
dmoj/cptbox/isolate.py 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
- Coverage   82.99%   82.91%   -0.08%     
==========================================
  Files         141      141              
  Lines        5362     5373      +11     
==========================================
+ Hits         4450     4455       +5     
- Misses        912      918       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@quantum5
Copy link
Member

quantum5 commented Jan 8, 2024

ok to test

@Xyene
Copy link
Member

Xyene commented Jan 14, 2024

This executor tries to traverse ~/GNUstep, but this directory doesn't exist. I did RecursiveDir('~') to work around this issue.

In what way does it fail if you don't allow ~, and allow ~/GNUstep instead?

@int-y1
Copy link
Contributor Author

int-y1 commented Jan 15, 2024

This executor tries to traverse ~/GNUstep, but this directory doesn't exist. I did RecursiveDir('~') to work around this issue.

In what way does it fail if you don't allow ~, and allow ~/GNUstep instead?

0.414 Testing OBJC:   Failed self-test                                                                                                                                                                
0.500   Attempted:                                                                                                                                                                                    
0.502     gcc: /usr/bin/gcc
...
0.502   Errors:
0.502     Traceback (most recent call last):
0.502       File "/judge/dmoj/executors/base_executor.py", line 337, in run_self_test
0.502         executor = cls(cls.test_name, utf8bytes(cls.test_program))
0.502                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.502       File "/judge/dmoj/executors/compiled_executor.py", line 63, in __call__
0.502         obj.compile()
0.502       File "/judge/dmoj/executors/compiled_executor.py", line 212, in compile
0.502         self.warning = self.get_compile_output(process)
0.502                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.502       File "/judge/dmoj/executors/compiled_executor.py", line 194, in get_compile_output
0.502         self.handle_compile_error(output)
0.502       File "/judge/dmoj/executors/compiled_executor.py", line 205, in handle_compile_error
0.502         raise CompileError(output)
0.502     dmoj.error.CompileError: cc1obj: error: /home/judge/GNUstep/Library/Headers: Permission denied

Copy link
Member

@Xyene Xyene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Xyene Xyene merged commit c70e803 into DMOJ:master Jan 15, 2024
10 checks passed
@int-y1 int-y1 deleted the fix-objc branch January 15, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants