Skip to content

Fix pergeovisibility Heisenbug #7

Description

@NullHypothesis

It looks like the improved /24 prefix counting code introduced a subtle stack corruption somewhere in bvc_pergeovisibility.c. The code runs fine on Thor, where we did all of the testing, but it fails on bgpview-consumers-ioda. We believe that the variable num_ips somehow gets corrupted, which leads to cur_address not being updated:

cur_address += num_ips;

We first fixed the issue by ensuring that cur_address either points to the end or the beginning of the given prefix. Apparently we only fixed the symptom but not the issue's root cause.

The bug happens regardless of optimisation, i.e., -O0-compiled code triggers it and so does -O3. Adding printf or assert statements also makes the bug disappear, so it may have something to do with the memory layout. Commit e8fa1da seems to be working so far but 5074710 (and possibly past commits) is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions