Skip to content

FFI function cleanup_openal_context() has a memory issue without pre-checking #25

@cicilzx

Description

@cicilzx

Hi, I'm developing a fuzzer to test the safe abstraction, and I fonnd a segmentation fault when calling function ears/src/internal.rs/cleanup_openal_context().

The test case is as follows:

#[allow(warnings, unused)]
#[test]
fn test_cleanup_openal_context_s7Huz() {
    let _ = cleanup_openal_context();
}

Calling the cleanup_openal_context() function directly without any pre-checks results in a memory error, which is reported as follows:

Caused by:
  process didn't exit successfully: `/home/cici/ears/target/debug/deps/ears-3aa3cfab0315f845 'internal::test_cleanup_openal_context_s7Huz' --exact --show-output` (signal: 11, SIGSEGV: invalid memory reference)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions