[Valgrind-users] Suspect "uninitialised value(s)" error

2023-10-11 Thread Karl Robillard via Valgrind-users
I'm getting the following error on struct members which should absolutely be initialized: Conditional jump or move depends on uninitialised value(s) To begin investigating I did a memset of zero on the entire struct and the error goes away. Now this C++ struct inherits another one and the err

Re: [Valgrind-users] Suspect "uninitialised value(s)" error

2023-10-11 Thread Karl Robillard via Valgrind-users
I've narrowed down the struct member offset error that Valgrind seems to be making. Uninitialised value errors are being reported for two float members with offsets of 36 & 48 bytes into the 72 byte DrawState struct. Using memset to clear just 4 bytes at offset 104 in the ListDrawState causes

Re: [Valgrind-users] Suspect "uninitialised value(s)" error

2023-10-12 Thread Karl Robillard via Valgrind-users
On Thursday, October 12, 2023 4:16:17 AM EDT Paul Floyd wrote: > Yes, a lot of users tend to be confused in thinking that once an object > has been initialized then it will always be initialized. > > We can't see when is happening between the possibly incomplete > initialization and the actual err

Re: [Valgrind-users] Suspect "uninitialised value(s)" error

2023-10-12 Thread Karl Robillard via Valgrind-users
On Thursday, October 12, 2023 4:16:17 AM EDT Paul Floyd wrote: > Yes, a lot of users tend to be confused in thinking that once an object > has been initialized then it will always be initialized. I found the problem in my code and it was as you say Paul. Due to a bug elsewhere, some member in th