Skip to content

Panic due to incorrect usage of winapi #570

@DomantasJ

Description

@DomantasJ

A user on reddit reported that System::new_all() panics on his windows machine. Here's what I found:

  1. The panic is caused by this offset_from call because referent is zero sized
  2. LPVOID is an alias to *mut c_void
  3. Unless std feature is enabled in winapi, it defines c_void as an empty enum

So the use of offset_from does not seem to be valid without enabling winapi/std. Although I'm not sure if winapi is doing the right thing by defining c_void as a zero sized type.

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