Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init disk instance before use #859

Closed
wants to merge 1 commit into from
Closed

init disk instance before use #859

wants to merge 1 commit into from

Conversation

ThomasAUB
Copy link

under some compilers (e.g. MSVC) the variable may not be init to 0 which can lead to a crash at line 918

under some compilers (e.g. MSVC) the variable may not be init to 0 which can lead to a crash at line 918
@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 16670 B (+0.0%), Stack: 1432 B (+0.0%), Structs: 788 B (+0.0%)
Code Stack Structs Coverage
Default 16670 B (+0.0%) 1432 B (+0.0%) 788 B (+0.0%) Lines 2318/2498 lines (+0.0%)
Readonly 6126 B (+0.0%) 448 B (+0.0%) 788 B (+0.0%) Branches 1184/1506 branches (-0.0%)
Threadsafe 17498 B (+0.0%) 1432 B (+0.0%) 796 B (+0.0%) Benchmarks
Multiversion 16746 B (+0.0%) 1432 B (+0.0%) 792 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18354 B (+0.0%) 1736 B (+0.0%) 792 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17306 B (+0.0%) 1424 B (+0.0%) 788 B (+0.0%) Erased 1568888832 B (+0.0%)

@ThomasAUB ThomasAUB closed this Jul 25, 2023
@ThomasAUB ThomasAUB reopened this Jul 25, 2023
@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 16670 B (+0.0%), Stack: 1432 B (+0.0%), Structs: 788 B (+0.0%)
Code Stack Structs Coverage
Default 16670 B (+0.0%) 1432 B (+0.0%) 788 B (+0.0%) Lines 2318/2498 lines (+0.0%)
Readonly 6126 B (+0.0%) 448 B (+0.0%) 788 B (+0.0%) Branches 1184/1506 branches (-0.0%)
Threadsafe 17498 B (+0.0%) 1432 B (+0.0%) 796 B (+0.0%) Benchmarks
Multiversion 16746 B (+0.0%) 1432 B (+0.0%) 792 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18354 B (+0.0%) 1736 B (+0.0%) 792 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17306 B (+0.0%) 1424 B (+0.0%) 788 B (+0.0%) Erased 1568888832 B (+0.0%)

@geky geky added the lint label Aug 3, 2023
@geky
Copy link
Member

geky commented Aug 3, 2023

Hi @ThomasAUB, thanks for creating a PR.

It's worth noting that uninitialized struct does go unused. It gets stored to an explicit stack, which is probably why MSVC is tripping over it, but it doesn't get accessed unless the highest bit in the tag is set, which only occurs when we assign contents to the struct.

But we can go ahead an merge this to fix the warning.

Though it looks like @mdahamshi made a PR earlier, so will go with that one: #855

@geky geky closed this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants