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

Preprocessor endless loop eat all memory #204

Open
mingodad opened this issue Jun 3, 2024 · 1 comment
Open

Preprocessor endless loop eat all memory #204

mingodad opened this issue Jun 3, 2024 · 1 comment

Comments

@mingodad
Copy link

mingodad commented Jun 3, 2024

While trying to figure out this issue #203 and attempting to dump the preprocessed source I found that circle seems to enter an endless loop and eat all memory.

g++-9.4
0.08user 0.01system 0:00.11elapsed 85%CPU (0avgtext+0avgdata 21992maxresident)k
0inputs+0outputs (0major+2499minor)pagefaults 0swaps

clang++-18
0.07user 0.01system 0:00.11elapsed 78%CPU (0avgtext+0avgdata 63860maxresident)k
328inputs+0outputs (1major+4108minor)pagefaults 0swaps

Script to test:

# run gcc compiler in freestanding mode
optim=-O2
#CXX=g++
#CXX="clang-18-env clang++"
#CXX="circle -DCIRCLE_SAFETY_ON"
CXX=circle

/usr/bin/time $CXX $optim  -E -fno-rtti -Wall \
	-DNDEBUG -DONLY_ASCII -DNO_ABSTRACT_METHOD -DCUSTOM_DELETE_OPERATOR -DSQ_USE_MKSTEMP  -DSQ_ENABLE_INCLUDES -DSQ_SUBLATIN -DNEED_SUBLATIN_C -DSQUSEDOUBLE \
	-D__SQAMALGAMATION__ -D_SQ64 -DMAKE_SQ_CMD am-squilu.cpp #-o am-squilu-circle

Sources : https://github.com/user-attachments/files/15526008/am-squilu.cpp.zip

@sanbei101
Copy link

This is an extremely serious problem!

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

2 participants