berkus / chronicle-recorder

Automatically exported from code.google.com/p/chronicle-recorder
0 stars 0 forks source link

Make Check Fail: Multi-range or mmapped memory not supported #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Checkout svn version 51
2. Modify makefile to (cd valgrind; ./configure --enable-only64bit && make)
3. Fix bug at line 8837 in /chronicle/valgrind/VEX/priv/guest-amd64/toIR.c
     change if (n_prefixes > 5) goto decode_failure  to if (n_prefixes > 7)
goto decode_failure;
4 export CC="gcc -fno-stack-protector" 

What is the expected output? What do you see instead?

==13885== 
CHRONICLE_DB=tests/registers.db tests/registers.check
SENDING: {"cmd":"info","id":1}
GOT:
{"message":"debug.file.got.debug.info","severity":"info","text":"Loaded
symbols for
'/home/fowler/Code/chronicle-recorder-read-only/chronicle/tests/registers.bin'"}
GOT:
{"message":"debug.file.got.debug.info","severity":"info","text":"Loaded
symbols for
'/home/fowler/Code/chronicle-recorder-read-only/chronicle/valgrind/coregrind/vgp
reload_core-amd64-linux.so'"}
GOT:
{"message":"debug.file.no.debug.info","severity":"info","text":"Executable
file '/lib/ld-2.6.1.so' does not have debug info"}
GOT:
{"message":"debug.file.no.debug.info","severity":"info","text":"Executable
file '/lib/libc-2.6.1.so' does not have debug info"}
GOT:
{"arch":"amd64","endian":"little","endTStamp":92136,"maps":["INSTR_EXEC","MEM_WR
ITE","ENTER_SP","MEM_MAP"],"id":1,"progress":0,"progressMax":1}
GOT: {"id":1,"terminated":"normal","progress":1,"progressMax":1}
SENDING: {"cmd":"lookupGlobalFunctions","id":2,"name":"local1"}
GOT:
{"entryPoint":4195560,"beginTStamp":1,"endTStamp":92136,"typeKey":"T0_21e","prol
ogueEnd":4195574,"name":"local1","ranges":[{"start":4195560,"length":32}],"langu
age":"C89","compilationUnit":"tests/registers.c","compilationUnitDir":"/home/fow
ler/Code/chronicle-recorder-read-only/chronicle","id":2,"progress":1,"progressMa
x":2}
GOT: {"id":2,"terminated":"normal","progress":2,"progressMax":2}
SENDING:
{"beginTStamp":1,"cmd":"scan","endTStamp":92136,"id":3,"map":"INSTR_EXEC","range
s":[{"length":1,"start":4195574}]}
GOT:
{"TStamp":1,"start":4195574,"length":1,"type":"mmap","filename":"/home/fowler/Co
de/chronicle-recorder-read-only/chronicle/tests/registers.bin","offset":1270,"ma
pped":true,"read":true,"write":false,"execute":true,"id":3,"progress":0,"progres
sMax":2}
GOT:
{"TStamp":90835,"start":4195574,"length":1,"type":"normal","id":3,"progress":0,"
progressMax":2}
GOT: {"id":3,"progress":1,"progressMax":2}
GOT: {"id":3,"terminated":"normal","progress":2,"progressMax":2}
SENDING: {"TStamp":90835,"cmd":"getParameters","id":4}
GOT:
{"name":"a","valKey":"V0_246_26d","typeKey":"T0_21e","id":4,"progress":0,"progre
ssMax":2}
GOT:
{"name":"b","valKey":"V0_246_279","typeKey":"T0_21e","id":4,"progress":1,"progre
ssMax":2}
GOT: {"id":4,"terminated":"normal","progress":2,"progressMax":2}
SENDING:
{"TStamp":90835,"cmd":"getLocation","id":5,"typeKey":"T0_21e","valKey":"V0_246_2
6d"}
GOT:
{"register":"rbp","registerBitOffset":0,"type":"register","bitLength":64,"id":5,
"progress":0,"progressMax":2}
GOT:
{"address":34342962252,"addressBitOffset":0,"type":"memory","valueBitStart":0,"b
itLength":0,"id":5,"progress":0,"progressMax":2}
GOT:
{"validForInstructions":[{"start":4195564,"length":28}],"id":5,"progress":1,"pro
gressMax":2}
GOT: {"id":5,"terminated":"normal","progress":2,"progressMax":2}
SENDING:
{"TStamp":90835,"cmd":"readMem","id":6,"ranges":[{"length":8,"start":34342962252
}]}
GOT:
{"start":34342962252,"length":4,"bytes":"03000000","id":6,"progress":0,"progress
Max":2}
GOT:
{"start":34342962256,"length":4,"bytes":"900400ff","id":6,"progress":0,"progress
Max":2}
GOT: {"id":6,"progress":1,"progressMax":2}
GOT: {"id":6,"terminated":"normal","progress":2,"progressMax":2}
Multi-range or mmapped memory not supported at tests/registers.check line
86, <IN> line 23.
make: *** [tests/registers.ok] Error 9

What version of the product are you using? On what operating system?

SVN version 51. Ubuntu Gutsy. gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu
4.1.2-16ubuntu2).

Original issue reported on code.google.com by elethio...@gmail.com on 3 Jan 2008 at 9:06

GoogleCodeExporter commented 9 years ago
This is a bug in the test case, isn't it? The docs say:
"The memory ranges returned may not correspond exactly to the ranges requested; 
the
only guarantee is that if the query terminates normally then the union of the 
ranges
returned equals the union of the ranges requested."

but the test case currently assumes that it will only get back a single answer
covering the whole range (and on your system there happen to be two which 
between
them cover the range). (It looks like there are various 'not supported' 
messages the
test case can generate which all mean 'this test harness doesn't support this', 
not
'the program under test doesn't support this feature it ought to'.)

Original comment by pmayd...@gmail.com on 20 Dec 2008 at 10:36