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

[NonFetal Error]: use-of-uninitialized-value in bison(version 3.8.2.45, commit 25b3d0e1) #94

Open
benehalo opened this issue Oct 11, 2022 · 0 comments

Comments

@benehalo
Copy link

Crash Inputs

Here are the files that trigger the bug - muscle-tab.c_186_3-in-muscle_grow.zip

Bug Description

I apply MSan (Memory Sanitizer) to check for errors and report the detected errors as follows.

MemorySanitizer: use-of-uninitialized-value
    #0 0x54f335 in muscle_grow /data/code/bison/src/muscle-tab.c:186:3
    #1 0x54e4c4 in muscle_syncline_grow /data/code/bison/src/muscle-tab.c:214:3
    #2 0x54c815 in muscle_code_grow /data/code/bison/src/muscle-tab.c:227:3
    #3 0x5c4783 in gram_parse /data/code/bison/src/parse-gram.c:2082:7
    #4 0x6074a5 in reader /data/code/bison/src/reader.c:766:3
    #5 0x54a754 in main /data/code/bison/src/main.c:118:3
    #6 0x7f62fc25a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #7 0x41d70d in _start (/data/program/bison/orig-msan/bin/bison+0x41d70d)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /data/code/bison/src/muscle-tab.c:186:3 in muscle_grow

How to Reproduce

The aforementioned bug can be stably reproduced in version 3.8.2.45 (commit id 25b3d0e).

  1. Download the bison source code with the official link.
  2. Using clang/clang++ (10.0.0-4ubuntu1), build bison with MSan.
    • -U_FORTIFY_SOURCE -fsanitize=memory -g
  3. Execute bison with the provided input files.
    • eg: /data/program/bison/orig-msan/bin/bison <input-file-path>
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