Project

General

Profile

Actions

Bug #5012

closed
PA

Remove duplicate definition of constants between C and Rust

Bug #5012: Remove duplicate definition of constants between C and Rust

Added by Philippe Antoine about 4 years ago. Updated almost 3 years ago.

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

Description

Discussion comes from https://github.com/OISF/suricata/pull/6840

PGSQL_LOG_PASSWORDS is not exported by cbindgen

With the following patch

-pub const PGSQL_LOG_PASSWORDS: u32 = BIT_U32!(1);
+pub const PGSQL_LOG_PASSWORDS: u32 = 2;

it does get exported

FLOW_DIR_REVERSED is another example

CI should ensure this get no longer added


Related issues 2 (1 open1 closed)

Related to Suricata - Bug #5007: pgsql: coverity warningClosedJuliana Fajardini ReichowActions
Related to Suricata - Optimization #4517: cbindgen export the constants from Rust to C, also for macro such as BIT_U8(1), and remove duplicate definitions between rust and CAssignedOISF DevActions

JF Updated by Juliana Fajardini Reichow about 4 years ago Actions #1

  • Related to Bug #5007: pgsql: coverity warning added

PA Updated by Philippe Antoine about 4 years ago Actions #3

  • Priority changed from Normal to Low

PA Updated by Philippe Antoine about 4 years ago Actions #4

  • Priority changed from Low to Normal
  • Target version changed from 7.0.0-beta1 to TBD

PA Updated by Philippe Antoine almost 4 years ago Actions #5

  • Related to Optimization #4517: cbindgen export the constants from Rust to C, also for macro such as BIT_U8(1), and remove duplicate definitions between rust and C added

PA Updated by Philippe Antoine almost 3 years ago Actions #6

Looks like the best is to get rid of rust `BIT_U` macros

PA Updated by Philippe Antoine almost 3 years ago Actions #7

Or maybe have a dummy cbindgen-like which does the headers for BIT_U macros...

PA Updated by Philippe Antoine almost 3 years ago Actions #8

  • Status changed from New to Closed

To be done with #4517

Actions

Also available in: PDF Atom