Project

General

Profile

Actions

Bug #7338

open

rust: Rust 1.82.0 introduces an FFI issue where the C and Rust integer sizes differ in app-layer API

Added by Jason Ish 27 days ago. Updated 26 days ago.

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

Description

For example, in output-json-anomaly.c we have:

        int r;
            r = AppLayerGetEventInfoById(event_code, &event_name, &event_type);

Ultimately, at least for bittorrent-dht this results in a Rust function being called where the return type is i8. Even though Rust appears to return 0, the value seen by C is garbage.

- Likely due to the update to LLVM 19 in Rust 1.82.0.
- Doesn't appear to affect release builds, only debug builds.
- Only seems to affect return values, not return by argument style pointers.


Subtasks 1 (1 open0 closed)

Bug #7339: rust: Rust 1.82.0 introduces an FFI issue where the C and Rust integer sizes differ in app-layer API (7.0.x backport)AssignedJason IshActions
Actions #1

Updated by Jason Ish 27 days ago

  • Description updated (diff)
Actions #2

Updated by Jason Ish 27 days ago

  • Description updated (diff)
Actions #3

Updated by Jason Ish 27 days ago

  • Description updated (diff)
Actions #4

Updated by Victor Julien 26 days ago

  • Label Needs backport to 7.0 added
Actions #5

Updated by OISF Ticketbot 26 days ago

  • Subtask #7339 added
Actions #6

Updated by OISF Ticketbot 26 days ago

  • Label deleted (Needs backport to 7.0)
Actions #7

Updated by Jason Ish 26 days ago

  • Status changed from Assigned to Resolved
Actions

Also available in: Atom PDF