DynamoRIO / DynamoRIO/dynamorio

ASSERT dispatch.c:753 wherewasi == DR_WHERE_FCACHE || wherewasi == DR_WHERE_TRAMPOLINE || wherewasi == DR_WHERE_APP

Open
#3,175 16 comments 0 reactions 0 assignees View on GitHub
Bug-Assert help wanted
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

On a 64-bit Ubuntu 18.04 system, with DynamoRIO e59a5cb4283ad10dbc2646bb1e28f06a4e859667, and a 64-bit application, I'm encountering the following assertion failure, while instrumenting a [benchmark program](https://github.com/kozyraki/stamp) for a [transactional memory framework](https://github.com/patrickmarlier/tinySTM).

```
Starting program: /mnt/data/sources/dynamorio/build/bin64/drrun -debug -c ../tinySTM/instrumentation/build/libstm-dynamorio.so -- ./labyrinth/labyrinth -i labyrinth/inputs/random-x32-y32-z3-n96.txt -t4
process 123390 is executing new program: /mnt/data/sources/dynamorio/build/lib64/debug/libdynamorio.so

[New LWP 123422]
[New LWP 123423]
[New LWP 123424]
Maze dimensions = 32 x 32 x 3
Paths to route = 96

[LWP 123423 exited]
[LWP 123422 exited]
[LWP 123390 exited]
[Inferior 1 (process 123390) exited with code 0377]
```

Inspecting the crash under GDB shows that the `wherewasi` variable has an unexpected value.
```
(gdb) i threads
Id Target Id Frame
* 1 LWP 123448 "labyrinth" 0x00007fb012087a94 in dispatch_enter_dynamorio (dcontext=0x7faffd5f4940) at ../core/dispatch.c:752
2 LWP 123453 "labyrinth" syscall_ready () at ../core/arch/x86/x86_shared.asm:180
3 LWP 123454 "labyrinth" syscall_ready () at ../core/arch/x86/x86_shared.asm:180
4 LWP 123455 "labyrinth" syscall_ready () at ../core/arch/x86/x86_shared.asm:180
(gdb) p wherewasi
$1 = DR_WHERE_DISPATCH
(gdb) bt
#0 report_dynamorio_problem (dcontext=0x0, dumpcore_flag=8, exception_addr=0x0, report_ebp=0x0,
fmt=0x7fb0122daf98 "DynamoRIO debug check failure: %s:%d %s\n(Error occurred @%d frags)") at ../core/utils.c:2127
#1 0x00007fb01209c1fc in internal_error (file=0x7fb0122d7394 "../core/dispatch.c", line=753,
expr=0x7fb0122d7c88 "wherewasi == DR_WHERE_FCACHE || wherewasi == DR_WHERE_TRAMPOLINE || wherewasi == DR_WHERE_APP")
at ../core/utils.c:177
#2 0x00007fb012087a94 in dispatch_enter_dynamorio (dcontext=0x7faffd5f4940) at ../core/dispatch.c:752
#3 0x00007fb0120842d3 in dispatch (dcontext=0x7faffd5f4940) at ../core/dispatch.c:165
#4 0x00007faffd5e6f05 in ?? ()
#5 0x0000000000000000 in ?? ()
```

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.