Details
-
Bug
-
Resolution: Fixed
-
Major
-
Lustre 2.11.0
-
3
-
9223372036854775807
Description
Found 1 new static analysis issues in v2_10_57_0-88-g8059dbb:
- Result of function that may return NULL will be dereferenced
- lustre/utils/mount_lustre.c: in parse_options, Pointer 'options' returned from call to function 'calloc' at line 269 may be NULL and will be dereferenced at line 296. Also there are 3 similar errors on lines 301, 321, 343.
TRACEBACK:
- mount_lustre.c:269: 'options' is assigned the return value from function 'calloc'.
- mount_lustre.c:299: __builtin_constant_p(5) is true
- mount_lustre.c:299: (_builtin_constant_p(arg) &&strlen(arg) < ( (size_t) (5) ) ) || (_builtin_constant_p("nosvc") &&strlen("nosvc") < ( (size_t) (5) ) ) is false
- mount_lustre.c:299: ( (_builtin_constant_p(5) && ( (builtin_constant_p(arg) &&strlen(arg) < ( (size_t) (5) ) ) || (builtin_constant_p("nosvc") &&strlen("nosvc") < ( (size_t) (5) ) ) )? ( {size_t __s1_len __s2_len; (builtin_constant_p(arg) &&builtin_constant_p("nosvc") && (s1_len=strlen(arg) ,s2_len=strlen("nosvc") , ( ! ( (size_t) (const void_ ) ( (arg) +1) - (size_t) (const void* ) (arg) ==1) ||_s1_len>=4) && ( ! ( (size_t) (const void* ) ( ("nosvc") +1) - (size_t) (const void* ) ("nosvc") ==1) ||s2_len>=4) )?builtin_strcmp(arg, "nosvc" ) : (builtin_constant_p(arg) && ( (size_t) (const void* ) ( (arg) +1) - (size_t) (const void* ) (arg) ==1) && (s1_len=strlen(arg) ,s1_len<4)? (builtin_constant_p("nosvc") && ( (size_t) (const void* ) ( ("nosvc") +1) - (size_t) (const void* ) ("nosvc") ==1)?builtin_strcmp(arg, "nosvc" ) : ( ( {const unsigned char*_s2= (const unsigned char* ) (const char* ) ("nosvc") ;register int __result= ( ( (const unsigned char* ) (const char* ) (arg) )(...)
- mount_lustre.c:304: _builtin_constant_p(opt) &&builtin_constant_p("force") && (s1_len=strlen(opt) ,s2_len=strlen("force") , ( ! ( (size_t) (const void_ ) ( (opt) +1) - (size_t) (const void* ) (opt) ==1) ||_s1_len>=4) && ( ! ( (size_t) (const void* ) ( ("force") +1) - (size_t) (const void* ) ("force") ==1) ||_s2_len>=4) ) is false
- mount_lustre.c:304: _builtin_constant_p(opt) && ( (size_t) (const void_ ) ( (opt) +1) - (size_t) (const void* ) (opt) ==1) && (_s1_len=strlen(opt) ,_s1_len<4) is false
- mount_lustre.c:304: _builtin_constant_p("force") && ( (size_t) (const void_ ) ( ("force") +1) - (size_t) (const void* ) ("force") ==1) && (_s2_len=strlen("force") ,_s2_len<4) is false
- mount_lustre.c:319: parse_one_option(opt, flagp) ==0 is false
- mount_lustre.c:272: __builtin_constant_p(",") && ( (size_t) (const void ) ( (",") +1) - (size_t) (const void* ) (",") ==1) is false
- mount_lustre.c:272: _builtin_constant_p(",") && ( (size_t) (const void_ ) ( (",") +1) - (size_t) (const void* ) (",") ==1) && (__r0= ( (const char* ) (",") ) [0] , ( (const char* ) (",") ) [0] !=0) is false
- mount_lustre.c:296: 'options' is dereferenced by passing argument 1 to function 'append_option'.
- mount_lustre.c:238: 'options' is passed to function 'append_option'.
- mount_lustre.c:242: 'options' is explicitly dereferenced.
The list of commits since the previous build v2_10_57_0-57-g98ddc99:
8059dbb | - |
f632910 | |
955e096 | - |
8b3cb15 | - |
7db3837 | - |
a4ac52a | |
4cbcea2 | - |
be77f4b | - |
8ef3ddd | - |
859b7a4 | - |
70e1532 | - |
73f15ad | - |
8a71fd5 | - |
a6fb2bb | - |
a48853c | - |
6ff1630 | - |
027a723 | - |
7c9ffea | - |
5fee5b7 | - |
942a985 | |
416e889 | - |
afef52b | |
21fb4d9 | |
d2629cf | |
b4b7734 | - |
73867dd | |
0c9bb26 | - |
8f1c7c1 | |
b6e718d | - |
4930632 | |
7327f66 | - |
Attachments
Issue Links
- is related to
-
LU-4629 Issues found by static analysis tools
- Resolved