DynamoRIO / DynamoRIO/dynamorio

Option `-disable_rseq` seems to be ignored

Open
#7,167 11 comments 0 reactions 0 assignees View on GitHub
Bug-DRCrash OpSys-Linux
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

**Describe the bug**

I compiled dynamo RIO in Ubuntu 24.04, but cannot run even the most trivial example with `drrun`. Here is the log:

```
/dynamorio/build/bin64/drrun -verbose -disable_rseq -- date
INFO: default root: /dynamorio/build/bin64/..
INFO: default toolconfig dir: /dynamorio/build/bin64/../tools
INFO: targeting application: "/usr/bin/date"
INFO: app cmdline: "date"
INFO: configuration directory is "/root/.dynamorio"
INFO: will exec /usr/bin/date

```

It seems that indeed Ubuntu's glibc is executing rseq:

```
strace -e rseq date
--- SIGILL {si_signo=SIGILL, si_code=SI_TKILL, si_pid=39, si_uid=0} ---
rseq(0x7ffc090d25a0, 0x20, 0, 0) = 0
rseq(0x7ffc090d25a0, 0x20, 0x1, 0) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xffffffffff600000} ---
rseq(0x7ffc090d2420, 0x20, 0, 0) = 0
rseq(0x7ffc090d2420, 0x20, 0x1, 0) = 0
rseq(0x7fde30668060, 0x20, 0, 0x53053053) = 0
Sat Dec 21 23:34:01 UTC 2024
+++ exited with 0 +++
```

But I would have expected `-disable_rseq` to fix the problem.

**To Reproduce**

Here is the Dockerfile you can use to reproduce the issue:

```
# Use the latest LTS Ubuntu as the base image
FROM ubuntu:24.04

# Set the working directory
WORKDIR /dynamorio

# Install necessary dependencies
RUN apt-get update && apt-get install -y \
cmake \
g++ \
g++-multilib \
doxygen \
git \
zlib1g-dev \
libunwind-dev \
libsnappy-dev \
liblz4-dev

# Clone DynamoRIO repository
RUN git clone --recurse-submodules -j4 https://github.com/DynamoRIO/dynamorio.git .

# Create build directory and build DynamoRIO
RUN mkdir build && cd build && \
cmake .. && \
make -j

# Set the entry point to drrun
ENTRYPOINT ["/dynamorio/build/bin64/drrun"]
```

**Versions**

I tried git master (fa2eaa846937) and precompiled 11.2.0 release. The behavior is the same.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.