• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Gallopsled / pwntools / 2964
74%

Build:
DEFAULT BRANCH: dev
Ran 12 Dec 2017 08:29PM UTC
Jobs 1
Files 131
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2964

push

travis-ci

zachriggle
Better error message when gdbserver fails on LD_PRELOAD (#1083)

When one passes a `LD_PRELOAD` which cannot be preloaded the `process_created` string might end up looking like this:
```
"ERROR: ld.so: object '/bin/bash' from LD_PRELOAD cannot be preloaded (cannot dynamically load executable): ignored.\n"
```

When we end up in such situation, pwndbg shown unintuitive error:
```
$ python -c 'from pwn import *; gdb.debug("/bin/ls", env={"LD_PRELOAD": "/bin/bash"})'
[+] Starting local process '/usr/bin/gdbserver': pid 20691
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "pwnlib/context/__init__.py", line 1349, in setter
    return function(*a, **kw)
  File "pwnlib/gdb.py", line 397, in debug
    port = _gdbserver_port(gdbserver, ssh)
  File "pwnlib/gdb.py", line 234, in _gdbserver_port
    gdbserver.pid   = int(process_created.split()[-1], 0)
ValueError: invalid literal for int() with base 0: 'ignored.'
```

After this patch it will show:
```
$ python -c 'from pwn import *; gdb.debug("/bin/ls", env={"LD_PRELOAD": "/bin/bash"})'
[+] Starting local process '/usr/bin/gdbserver': pid 20863
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "pwnlib/context/__init__.py", line 1349, in setter
    return function(*a, **kw)
  File "pwnlib/gdb.py", line 402, in debug
    port = _gdbserver_port(gdbserver, ssh)
  File "pwnlib/gdb.py", line 236, in _gdbserver_port
    'Failed to spawn process under gdbserver. gdbserver error message: %s' % process_created
ValueError: Failed to spawn process under gdbserver. gdbserver error message: ERROR: ld.so: object '/bin/bash' from LD_PRELOAD cannot be preloaded (cannot dynamically load executable): ignored.

[*] Stopped process '/bin/ls' (pid 20863)
```

2281 of 5269 branches covered (43.29%)

2 of 2 new or added lines in 1 file covered. (100.0%)

7948 of 13685 relevant lines covered (58.08%)

0.58 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
pwnlib/gdb.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
pwnlib/gdb.py
2
100.0
pwnlib/tubes/buffer.py
3
100.0
pwnlib/tubes/tube.py
Jobs
ID Job ID Ran Files Coverage
1 2964.1 12 Dec 2017 08:29PM UTC 0
58.08
Travis Job 2964.1
Source Files on build 2964
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2964
  • 932cb57b on github
  • Prev Build on dev (#2963)
  • Next Build on dev (#2967)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc