| Issue |
169108
|
| Summary |
[MSAN] Does not detect uninitialized large (799+ bytes) structs across function calls
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
JustLinuxUser
|
```c
// -Wall -Wextra -Wpedantic -fsanitize=memory -g -fno-inline-functions
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
typedef struct s_large_struct
{
char arr[800]; // With 799 the error is detected
char other;
} t_large_struct;
void use_uninit(t_large_struct s)
{
printf("el: %i\n", s.other);
}
int main(void)
{
t_large_struct s;
use_uninit(s);
}
```
[Godbolt](https://godbolt.org/z/317fW5czh)
For some reason msan stops tracking uninitialized structs across function calls when the function inlining is disabled, and the struct is larger then 799 bytes.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs