-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
stb_include.h: Includes files in commented #includes, leading to recursive inclusion and stack-overflow. #1679
Comments
Improved Bug ReportDescribe the bug /*
Here is how you use my library foo.h:
#include "foo.h"
bla bla bla
*/ When processed by Steps to reproduce
Expected behavior Actual behavior ==9728==ERROR: AddressSanitizer: stack-overflow on address 0x7ffcc7aca265
<empty stack>
SUMMARY: AddressSanitizer: stack-overflow
==9728==ABORTING Suggestions for Improvement
These changes should prevent recursive includes from commented directives, thereby avoiding stack overflow issues in complex projects. |
@SX1109 You are not helping anyone by letting ChatGPT rephrase pre existing bugreports. |
Describe the bug
stb_include.h does not distinguish between in an #include directive and a commented #include directive.
Let's say you have a header file with some documentation how to use it:
This recursively includes itself when processed by stb_include.h.
To Reproduce
Steps to reproduce the behavior:
include_preprocessor.c
Expected behavior
Ignore commented #includes.
The text was updated successfully, but these errors were encountered: