Skip to content

Panic when meeting vDSO #77

Open
@breezewish

Description

@breezewish

Example code:

TargetSharedLibrary::each(|obj| {
    some_container.push(obj.actual_load_addr().0);
})

It will panic under debug profile:

thread '<unnamed>' panicked at 'attempt to add with overflow', /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/findshlibs-0.10.2/src/lib.rs:261:14

In my case, the overflow comes from the vDSO:

obj_name = "linux-vdso.so.1"
segment_name = LOAD
stated_virtual_memory_address = 0xffffffffff700000
shlib.virtual_memory_bias = 0x7fff70cfc000

I'm using CentOS 7:

$ cat /etc/*elease
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions