-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Segfault on linux when easyloggingpp included in several files #117
Comments
Hi Alex, Thanks for the report - I have successfully reproduced the bug but I can see couple of things wrong here; I am going to list few of them here;
Let me know how did you go with your tests and feel free to close this issue if you happy |
Hello Majid, You are right about pt.1 ! It didn't cross my mind I have to "#define" the flags in each file where I include easyloggingpp.h - I was sure that once they are picked up by _INITIALIZE_EASYLOGGINGPP it's not necessary to re-define them anymore. Now it makes sense, but maybe you could add a section in the readme for noobs like me, regarding this :) Thank you again for your help and the fast feedback! Alex |
Platform: Linux (archlinux, debian)
Compiler: g++ or clang++
Log file location: default configuration
Macros: _ELPP_THREAD_SAFE
Easyloggingpp version: 9.22
Reproduction rate: 100%
Steps:
The problem occurs only on linux, I haven't seen it on MinGW32. In this simple example it happens only when "_ELPP_THREAD_SAFE" is defined. In my program it happens even if this is not enable (although there I actually use threads, so I need to have it defined). Please check below backtraces from gdb (for both g++ and clang++)
Thank you,
Alex
Logs with g++:
Logs with clang++:
The text was updated successfully, but these errors were encountered: