[SERVER-55066] maybe-uninitialized warning in timelib Created: 09/Mar/21 Updated: 27/Oct/23 Resolved: 24/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mohammad Dashti (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Sprint: | Query Execution 2021-05-31 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
I saw this on gcc-10 when compiling with -O3. It doesn't show up with -O2, probably due to less aggressive inlining not making it visible to the compiler.
It seems like a valid warning since `transition_time` won't be initialized if this return path is taken https://github.com/mongodb/mongo/blob/144e0d0f355dd5ec13a1aa135a1f59a90d234aa5/src/third_party/timelib-2018.01/parse_tz.c#L622. Initializing to 0 at https://github.com/mongodb/mongo/blob/144e0d0f355dd5ec13a1aa135a1f59a90d234aa5/src/third_party/timelib-2018.01/parse_tz.c#L671 seems to silence the warning. |
| Comments |
| Comment by Mohammad Dashti (Inactive) [ 24/May/21 ] |
|
Thanks David for fixing the label to the correct one. |
| Comment by David Storch [ 24/May/21 ] |
|
I have changed the resolution to "Gone Away" rather than "Fixed", since there are no commits to the code base against this ticket. |
| Comment by Mohammad Dashti (Inactive) [ 17/May/21 ] |
|
Thanks redbeard0531 for reporting this and acm for double-checking it. This issue does not exist in the latest version of timelib, which is already upgraded via |
| Comment by Ana Meza [ 04/May/21 ] |
|
Query will verify is this issue still exist in the latest version |
| Comment by Andrew Morrow (Inactive) [ 13/Mar/21 ] |
|
I just encountered this with toolchain v3 while evaluating -O3 for |