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

RecursionError: maximum recursion depth exceeded, [dcc-2.6.4] #62

Open
Dylan-Brotherston opened this issue Nov 25, 2019 · 1 comment
Open

Comments

@Dylan-Brotherston
Copy link
Contributor

#file_1.c
#include "file_2.c"

int main(void) {
    return 0;
}
#file_2.c
#include "file_1.c"

dcc-2.6.2

In file included from ./file_1.c:2:
In file included from ./file_2.c:2:
In file included from ./file_1.c:2:
In file included from ./file_2.c:2:
... # repeats many times
./file_2.c:1:10: error: #include nested too deeply
#include "file_1.c"

In file included from ./file_1.c:2:
In file included from ./file_2.c:2:
In file included from ./file_1.c:2:
In file included from ./file_2.c:2:
... # repeats many times
./file_1.c:4:5: error: redefinition of 'main'
int main(void) {
    ^
./file_1.c:4:5: note: previous definition is here
int main(void) {
    ^

dcc-2.6.4

Traceback (most recent call last):
  File "/web/cs2041/Python-3.7.2-pc.amd64.linux/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/web/cs2041/Python-3.7.2-pc.amd64.linux/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/cs1521/bin/dcc-2.6.4/__main__.py", line 48, in <module>
  File "/home/cs1521/bin/dcc-2.6.4/__main__.py", line 45, in main
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 34, in compile
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 338, in get_options
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 409, in parse_args
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 492, in parse_arg
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 508, in parse_clang_arg
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 521, in process_possible_source_file
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 521, in process_possible_source_file
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 521, in process_possible_source_file
  [Previous line repeated 982 more times]
  File "/home/cs1521/bin/dcc-2.6.4/compile.py", line 517, in process_possible_source_file
  File "/web/cs2041/Python-3.7.2-pc.amd64.linux/lib/python3.7/codecs.py", line 310, in __init__
    IncrementalDecoder.__init__(self, errors)
RecursionError: maximum recursion depth exceeded

The previous error is of course not great and could probably easily be improved. if just cutting down on the spam, and hiding the second error that is directly caused by the fist.

But an actual error is far better than a Traceback.

@Dylan-Brotherston
Copy link
Contributor Author

Fixed in dcc-2.6.6

Quality Of Life request. Squash repeating lines.

The output from this example:

In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
In file included from ./file_1.c:1:

Would become:

In file included from ./file_1.c:1:
In file included from ./file_2.c:1:
# previous 2 lines repeate 196 times

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

No branches or pull requests

1 participant