-
Notifications
You must be signed in to change notification settings - Fork 629
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
Incorrect handling of types causes a segfault on arm #1424
Conversation
valgrind is avaiable in your environment? I would like you to run "make units VG=1". I hope valgrind reports something unwanted cses. |
Thank you very much. |
main/parse.h
Outdated
@@ -148,7 +148,7 @@ extern bool doesLanguageAllowNullTag (const langType language); | |||
extern bool doesLanguageRequestAutomaticFQTag (const langType language); | |||
extern const char *getLanguageName (const langType language); | |||
extern kindDefinition* getLanguageKindForLetter (const langType language, char kindLetter); | |||
extern kindDefinition* getLanguageKind(const langType language, char kindIndex); | |||
extern kindDefinition* getLanguageKind(const langType language, signed char kindIndex); |
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.
Can I ask you to add comments explaining why "signed" is added here?
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.
This is done!
armv7l (e.g., Raspberry Pi) universal-ctags#1423 make units is passed.
51ebf7d
to
4c423b7
Compare
All test passed with valgrind on as well (it says |
Thank you. |
On armv7l, char type is actually unsigned. So doing a switch on an unsigned value kindIndex with a negative case value actually does not work. My suggestion is to fix the type of kindIndex specifically to signed char. All unit tests pass if I make that change as well.
make units is passed.
Created an issue: #1423
I am contributing the code under the terms of the General Public License version 2 or any later version.