Skip to content
Snippets Groups Projects
Commit 9b85882f authored by Chris-Savinovich's avatar Chris-Savinovich
Browse files

Test_cel: Fails when DONT_OPTIMIZE is off

A bug in GCC causes TEST_CEL to return
failure under the following conditions:
1. TEST_FRAMEWORK on
2. DONT_OPTIMIZE off
3. Fedora and Ubuntu
4. GCC 8.2.1
5. Test name: test_cel_dial_pickup
6. There must exist a certain combination of multithreading.
The bug affects arithmetic calculations when the optimization level
is bigger than O1 and the -fpartial-inline flag is on. Provided these
conditions, function ast_str_to_lower() fails to convert to lower case
due to said function being of type force_inline.  The solution is to
remove the "force_inline" type declaration from function ast_str_to_lower()
Change-Id: Ied32e0071f12ed9d5f3b4cdd878b2532a1c769d7
parent e66d4d1d
No related branches found
No related tags found
No related merge requests found
......@@ -1257,19 +1257,7 @@ static force_inline int attribute_pure ast_str_case_hash(const char *str)
*
* \retval str for convenience
*/
static force_inline char *attribute_pure ast_str_to_lower(char *str)
{
char *str_orig = str;
if (!str) {
return str;
}
for (; *str; ++str) {
*str = tolower(*str);
}
return str_orig;
}
char *attribute_pure ast_str_to_lower(char *str);
/*!
* \brief Convert a string to all upper-case
......
......@@ -391,3 +391,17 @@ char *ast_read_line_from_buffer(char **buffer)
return start;
}
char *attribute_pure ast_str_to_lower(char *str)
{
char *str_orig = str;
if (!str) {
return str;
}
for (; *str; ++str) {
*str = tolower(*str);
}
return str_orig;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment