Skip to content

bindgen generating Apache2 bindings with undefined behavior #23

@khklau

Description

@khklau

Currently using bindgen 0.57.0 and it is generating bindings to the Apache2 framework that produces undefined behavior:

warning: dereferencing a null pointer
    --> /home/kean/workspace/mod_tile_rs/target/debug/build/mod_tile_rs-fc2bd6664472f2ae/out/bindings.rs:2063:19
     |
2063 |         unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize },
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
     |
     = note: `#[warn(deref_nullptr)]` on by default 

If this issue isn't resolved in the latest bindgen version, I have to raise a ticket with them.

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