-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix broken build when MSVC SDL checks is enabled #1569
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
Conversation
@@ -782,8 +782,12 @@ static bin_tree_t *create_token_tree (re_dfa_t *dfa, | |||
#ifdef DEBUG | |||
/* Note: length+1 will not overflow since it is checked in init_dfa. */ | |||
dfa->re_str = re_malloc (char, length + 1); | |||
#if _MSC_VER >= 1400 | |||
strncpy_s (dfa->re_str, length + 1, pattern, length + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDL and DEBUG?
I don't understand the rationale here.
We made a pass to make sure SDL passed (though we did not apply banned.h
because, of course, some people run SDL on the binaries they ship. But it doesn't make sense to me to make the DEBUG version SDL compliant. Are you shipping debug DLLs? Are you running SDL on as part of your CI build (and building debug DLLs)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not checking the binaries. I compile from source directly. I am not using CMake, but dragging all the .c into a .vcxproj to compile. SDL is turned on in that .vcxproj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question is: you're using SDL on debug builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, SDL, debug build, win32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna pass on this change to regcomp, since it's in debug-only code. Can you drop it so I can merge the other fixes? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to regcomp has been dropped.
Thank you! |
Fix broken build when MSVC SDL checks is enabled
BTW, where to make changes to regcomp.c? |
Fix broken build when MSVC SDL checks is enabled
Fix broken build when MSVC SDL checks is enabled
Mostly initialize local variables.