anicoara
2014-01-20 20:06:15 UTC
Hello,
During my debugging sessions I realized that the type for
highDatum/lowDatum is not text.
The data that is exposed is truncated:
(gdb)
1005
4: lowp = 0x7f9a6458b74c "rtion"
3: highp = 0x22177fc "rtion's"
2: toReturn = 10
1: cmpLen = 0
Note that there is no "rtion" word in words.txt; in fact, the word used in
the index there is "abortion" and "abortion's" respectively.
The issue is that the length field that is packed at the address of
highDatum/lowDatum is 1 byte in length, which is further confirmed by:
(gdb) p VARSIZE_ANY_EXHDR(lowText)
$1 = 8
(gdb) p VARSIZE_ANY(lowText)
$2 = 9
Thus, the length field is only 1 byte long, but highp and lowp are
being set assuming a 4 byte long length filed.
This messes up the index, and the output that you use for marking.
A simple solution to get to the data is to use the macro:
VARDATA_ANY
but the lines of code that are used for marking need to be changed.
Preferably, lowp and highp would be served correctly.
Adrian
During my debugging sessions I realized that the type for
highDatum/lowDatum is not text.
The data that is exposed is truncated:
(gdb)
1005
4: lowp = 0x7f9a6458b74c "rtion"
3: highp = 0x22177fc "rtion's"
2: toReturn = 10
1: cmpLen = 0
Note that there is no "rtion" word in words.txt; in fact, the word used in
the index there is "abortion" and "abortion's" respectively.
The issue is that the length field that is packed at the address of
highDatum/lowDatum is 1 byte in length, which is further confirmed by:
(gdb) p VARSIZE_ANY_EXHDR(lowText)
$1 = 8
(gdb) p VARSIZE_ANY(lowText)
$2 = 9
Thus, the length field is only 1 byte long, but highp and lowp are
being set assuming a 4 byte long length filed.
This messes up the index, and the output that you use for marking.
A simple solution to get to the data is to use the macro:
VARDATA_ANY
but the lines of code that are used for marking need to be changed.
Preferably, lowp and highp would be served correctly.
Adrian