Yes, you're able to confirm this by setting:
ulimit -s unlimited305 karma · joined September 24, 2013
ulimit -s unlimitedThe reason I was testing this was a discussion on IRC about functions decaying to pointer to functions, such that they are endlessly dereferenceable. The snippet above crashes GCC -- hard.
So, while the implementation is free not to handle 10^7 dereferencing operations, I'm not sure a hard crash is the right answer.
Here's a version without the return and using a lambda to shorten it further:
python -S -c 'print("int main(){(" + "*"*10**7 + "+[]{})();}")' | g++ -std=c++11 -xc++ - python -S -c 'print("void f(){} int main(){return (" + "*"*10**7 + "f)();}")' | gcc -xc -
(This is legal C -- look it up. Don't argue with me over the practical relevance of this please)You want the compilers knowledge of the code for this, e.g. while formating C++ template mess.
There's a tight integration into the actual toolchains, which is a good thing.
Interesting. Never thought about it that way before.
One of the sad facts: "We do not honor Do Not Track requests."