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

MemorySanitizer: use-of-uninitialized-value in makefixed.c:43 #437

Closed
nmoinvaz opened this issue Oct 6, 2019 · 2 comments
Closed

MemorySanitizer: use-of-uninitialized-value in makefixed.c:43 #437

nmoinvaz opened this issue Oct 6, 2019 · 2 comments

Comments

@nmoinvaz
Copy link
Member

nmoinvaz commented Oct 6, 2019

  Uninitialized value was stored to memory at
    #0 0x427893 in __msan_memcpy.part.330 (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x427893)
    #1 0x49cc0a in write_bytes (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x49cc0a)

  Uninitialized value was created by an allocation of 'state' in the stack frame of function 'makefixed'
    #0 0x495e90 in makefixed /home/runner/work/zlib-ng/zlib-ng/tools/makefixed.c:43

==5120==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x49d58a in llvm_gcda_end_file (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x49d58a)
    #1 0x49cad3 in llvm_writeout_files (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x49cad3)
    #2 0x427523 in MSanAtExitWrapper(void*) (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x427523)
    #3 0x7f968411b040  (/lib/x86_64-linux-gnu/libc.so.6+0x43040)
    #4 0x7f968411b139 in exit (/lib/x86_64-linux-gnu/libc.so.6+0x43139)
    #5 0x7f96840f9b9d in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b9d)
    #6 0x41aa89 in _start (/home/runner/work/zlib-ng/zlib-ng/makefixed+0x41aa89)
@nmoinvaz
Copy link
Member Author

nmoinvaz commented Oct 6, 2019

The bug looks like it may be in zlib as well.

@nmoinvaz
Copy link
Member Author

nmoinvaz commented Oct 6, 2019

The thing to do here might be to memset state parameter before the call to buildfixedtables but I'm not 100% sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant