Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when meeting vDSO #77

Open
breezewish opened this issue Sep 18, 2022 · 0 comments · May be fixed by #81
Open

Panic when meeting vDSO #77

breezewish opened this issue Sep 18, 2022 · 0 comments · May be fixed by #81

Comments

@breezewish
Copy link

breezewish commented Sep 18, 2022

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/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant