Project

General

Profile

Actions

Bug #4358

closed

Add warning/error for datatypes differing b/w C and Rust w FFI

Added by Shivani Bhardwaj over 3 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:

Description

PR https://github.com/OISF/suricata/pull/5903/checks?check_run_id=1960895136 failed tests on Windows because of a type mismatch (u8 <-> i32), there was no warning/error from the compiler or cbindgen about this. Add a warning for such cases.
Jason says, "The compiler or cbindgen can't warn us here, but we could look at bindgen to create the extern statements.. However, not sure if it will define these function types for it, it generates more traditional extern statements like https://github.com/OISF/suricata/blob/681f95e80a885e56493b0994b22539b0bfbfa8a5/rust/src/core.rs#L224"


Related issues 1 (0 open1 closed)

Related to Suricata - Bug #4516: Integer overflowsClosedPhilippe AntoineActions
Actions #1

Updated by Shivani Bhardwaj over 3 years ago

  • Related to Bug #4516: Integer overflows added
Actions #2

Updated by Shivani Bhardwaj over 3 years ago

  • Priority changed from Normal to Low
Actions #3

Updated by Shivani Bhardwaj almost 3 years ago

  • Target version changed from 7.0.0-beta1 to 8.0.0-beta1

Jason says there is no reasonable fix without moving to bindgen.

Actions #4

Updated by Shivani Bhardwaj almost 3 years ago

  • Status changed from Assigned to Rejected

Jason suggested that only manual reviews can work in this case. It may be possible with bindgen (https://github.com/rust-lang/rust-bindgen) but we cannot do that right now.

Actions #5

Updated by Victor Julien over 1 year ago

  • Assignee deleted (Shivani Bhardwaj)
  • Priority changed from Low to Normal
  • Target version deleted (8.0.0-beta1)
Actions

Also available in: Atom PDF