Pastebin which is able to run your code. Accepts 40 languages.
ideone.com
ideone.com
#include <stdio.h>
int evil(int y)
{
char *x = (char *) malloc(y);
return(evil(y+1)-evil(y+2));
}
int main(int argc, char **argv)
{
int a = evil(1);
return 0;
}Are you trying to traverse function calls before compilation? You'll eventually run into the halting problem (http://en.wikipedia.org/wiki/Halting_problem) if this is your approach, though there may be a way to determine cases as simple as mine.
And it won't crash the server (at least... should not). There is a fixed limit on how much memory a process can allocate. This program will crash, but not because of malloc, just because the recursion gets too deep (stack overflow).
/spoj/c_run: line 5: 3844 Segmentation fault ./prog
is the error I got, and that doesn't look like a compile error. (Also, just to be pedantic, I had noted the stack overflow possibility in my original post).http://ideone.com/view/09u9091w9h# is the snippet.
Are said components open source?
I cannot find this information about SPOJ. It is a black box.
As my great aunt Ada used to say, "more eyeballs are better than your eyeballs."
letting lots of people execute arbitrary code in lots of languages on your servers seems like a huge "what could go wrong here?" from a security perspective.
Isn't this pretty much a reimplementation of codepad.org? So that's not entirely accurate...
apart from that, a definite improvement on the languages http://codepad.org/ supports
Chromium and Firefox 3.5 on Ubuntu just sit there "Loading...waiting for compilation"
Consider this a feature request for either service, it would be great.
@est: yeah... :)
@philjr: first ten languages are most popular ones, the rest is in the alphabetical order (between them is a special one - TEXT)
@philjr: we upgrade the servers - till 6 p.m. (CET) (planned)
/usr/lib/jvm/sun-jdk-1.6/bin/javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory