Status: Accepted
Owner: [email protected]
CC: erik.corry
Labels: Type-Bug Priority-High

New issue 2128 by [email protected]: String equality broken on slices of external strings
http://code.google.com/p/v8/issues/detail?id=2128

Execute the following in d8 (input file attached):

var s = readbinary("whyfp.pdf")
var u = s.slice(10, 12)
var v = u[0] + u[1]

print(u.length === 2)
print(v.length === 2)
print(u[0] === v[0])
print(u[1] === v[1])
print(u.charCodeAt(0) === v.charCodeAt(0))
print(u.charCodeAt(1) === v.charCodeAt(1))
print(u === v)

It prints true^6 and then false. AFAIK, the former properties should always imply the latter, even for non-ASCII strings.

Note that v amounts to the string "\xc7\xec".


Attachments:
        whyfp.pdf  194 KB

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to