Skip to content

fuzzing/printf: exit code differs #5777

Closed

Description

@oss-fuzz-robot

Activity

  1. sylvestre commented on Jan 3, 2024

    @sylvestre
    SponsorContributor

    hmm, i wonder if this isn't a thread issue here

    	Test completed with discrepancies for printf: ["%x", "%786"]
    	Running test ["printf", "%b", "842"]
    	Test Type: printf
    	Input: ["%b", "842"]
    	Rust exit code: 1
    	GNU exit code: 0
    	Discrepancy detected: exit code differs
    
  2. changed the title [-]OSS-Fuzz issue 65496[/-] [+]fuzzing/printf: exit code differs[/+] on Jan 3, 2024
  3. samueltardieu commented on Jan 4, 2024

    @samueltardieu
    Contributor

    If you run the fuzzers, you'll see that it happens in a test which runs just after an unsuccessful (but matching) test has been executed. This led me to explore whether you might use global variables somewhere, and you do… for the exit code (amongst others).

    I think this is a very bad idea to do so, and the most sensible plan would be to eliminate all global state. I'll submit a PR nontheless so that the fuzzer does not crash on it. Note that this would still not allow multi-threaded fuzzers to run correctly, but I don't know if those exist (most will create multiple processes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions