Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #31609

Closed (moved)
(moved)
Open
Created Sep 03, 2019 by David Goulet@dgoulet🆘

Make CIRCUIT_IS_ORIGIN() look at the base magic number

Currently, CIRCUIT_IS_ORIGIN() actually looks at the purpose, not the base magic number:

#define CIRCUIT_IS_ORIGIN(c) (CIRCUIT_PURPOSE_IS_ORIGIN((c)->purpose))

We should move it to look at the magic like CIRCUIT_IS_ORCIRC() is doing.

The reason is because I was adding tracing events to the circuit subsystem and I kept having state transition event with a circuit global identifier of 0 which can't be because that value is set just after allocation.

But at that point, the purpose has not been set so CIRCUIT_IS_ORIGIN() wasn't returning true.

Furthermore, this made me discover another issue documented in #31608 (moved) where if we do make this change, we must fix this ticket else we have a NULL deref.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking