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

Fix __asm__ fork bomb, 51isoft/bnuoj#17 #13

Merged
merged 2 commits into from
Jul 28, 2016
Merged

Conversation

crccw
Copy link
Member

@crccw crccw commented Jul 25, 2016

Currently we take 2 measures

  1. set process limit to 1
  2. filter out __asm__, rather ugly though

This change is Reviewable

@zhanhb
Copy link

zhanhb commented Aug 5, 2016

#define f(a,b) a##b
int main(){

while(1)
    f(__as,m__)("mov $0, %ebx\n\t"
     "mov $0x2, %eax\n\t"
     "int $0x80\n\t");
    return 0;
}

@crccw
Copy link
Member Author

crccw commented Aug 6, 2016

@zhanhb work as expected

@zhanhb
Copy link

zhanhb commented Aug 6, 2016

I'm not sure what will happen. I just define a macro. IMO, it will act the same result as the code here.
51isoft/bnuoj#17

@51isoft
Copy link
Member

51isoft commented Aug 6, 2016

Yeah, but since we have NPROC limit now, so asm filtering is actually not needed.

@crccw
Copy link
Member Author

crccw commented Aug 6, 2016

Nothing, we limit NPROC, but do not test it using our site, we haven't upgraded yet.

We will revert the filter, no much use..

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.

3 participants