ASSERT/CRASH encoding failed re-relativizing rip-relative address whose target is unreachable
From kai.stam...@gmail.com on July 21, 2014 12:32:44
I'm using SVN dynamorio on NTAMD64 using DRRUN:
C:\dev\dyn\libs\dynamorio-read-only\build_debug\bin64\drrun.exe -debug -no_follow_children -disable_traces -syntax_intel -no_hide -max_bb_instrs 512 -- I:...application.exe
Not too long after application startup, it runs into: "encoding failed re-relativizing rip-relative address whose target is unreachable"
The crashing instruction is rip-rel:
000000006F7821EB call _unlock (06F781634h)
000000006F7821F0 mov ecx,0Ch
000000006F7821F5 call _lock (06F781740h)
000000006F7821FA nop
000000006F7821FB mov rdi,qword ptr [rbx+0C0h]
000000006F782202 test rdi,rdi
000000006F782205 je _freefls+116h (06F782232h)
000000006F782207 mov rcx,rdi
000000006F78220A call __removelocaleref (06F7D1948h)
000000006F78220F cmp rdi,qword ptr [__ptlocinfo (06F813940h)] \<----
This code is part of MSVCR100.DLL!_freefls, which is used during _threadstartex. The instructions themselves don't seem to have a problem, but their location / location of replacements.
I failed to make a stripped down version of the problem, but I'm able to reproduce it any time.
It works with -vm_size 512M
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1479