00:05
Guest753 has quit [Quit: Client closed]
00:16
stkrdknmibalz has joined #pypy
00:40
lritter has quit [Ping timeout: 252 seconds]
05:08
Julian has joined #pypy
05:42
Julian has quit [Ping timeout: 252 seconds]
06:28
yizawa has joined #pypy
06:42
dustinm has quit [Quit: Leaving]
06:45
dustinm has joined #pypy
08:45
<
arigato >
just to tell you, I've been trying to look into the ppc jit issue---it's probably invalid assembly code generated---but I may lack the motivation to go through nowadays
08:58
yizawa has quit [Quit: Connection closed for inactivity]
09:12
LarstiQ has quit [Ping timeout: 260 seconds]
10:39
Julian has joined #pypy
11:05
Julian has quit [Ping timeout: 265 seconds]
12:19
ronan__ has joined #pypy
12:23
<
arigato >
cfbolz: seen in map-improvements-3.7: I'm not saying it is related to the crash, but I see that you're doing something that I
*think* is not allowed:
12:23
ronan has quit [Ping timeout: 252 seconds]
12:24
<
arigato >
you can't convert the bytes of an integer to a float, pass it around as a float, and later convert back to an integer
12:25
<
arigato >
doing that was something that we tried to do in the JIT and found that occasionally some byte pattern doesn't round-trip correctly
12:26
<
arigato >
we fixed it by declaring all storage places as LONGLONG instead of DOUBLE, so that we'd always pass everything around as a long long instead, and convert the bytes of floats to long long and back
12:26
<
cfbolz >
arigato: hm, I thought I was doing it that way around
12:27
<
arigato >
I see an integer instance attribute that is read with the operations:
12:27
<
arigato >
f126 = getarrayitem_gc_f
12:27
<
arigato >
i127 = convert_float_bytes_to_longlong(i126)
12:27
<
cfbolz >
arigato: right :-(
12:27
<
cfbolz >
Ok, then the storage instead needs to be a longlong
12:28
<
cfbolz >
And the cast in other direction?
12:28
<
arigato >
yes, I see this:
12:28
<
arigato >
i139 = int_add(i127, 1)
12:29
<
arigato >
f140 = convert_longlong_bytes_to_float(i139)
12:29
<
arigato >
setarrayitem_gc(p124, 0, f140, descr=<ArrayF 8>)
12:30
<
arigato >
(that's for self.index = self.index + 1)
12:31
<
cfbolz >
Shouldn't be too hard to fix
12:32
<
cfbolz >
arigato: it's some NaN that breaks, I suppose?
12:32
<
arigato >
I think so
12:34
<
cfbolz >
arigato: what does the list strategy do?
12:36
<
arigato >
it stores a list of floats, but the difference is that it never tries to cast a random 64-bit integer to a float
12:36
<
arigato >
instead, it limits itself to 32-bit integers and casts them into special NaN values, which seems to be preserved
12:37
<
arigato >
I'm honestly not sure about the rules
12:37
<
arigato >
...no wait
12:37
<
arigato >
no, it stores a list of longlongs, sorry
12:38
otisolsen70 has joined #pypy
12:40
<
cfbolz >
arigato: right, make sense
12:40
<
cfbolz >
But using the NaN bit patterns
12:41
<
arigato >
ah ha, getting there on the ppc bug
12:43
<
arigato >
yep, it's one of the many places where "self.index = self.index + 1" gets inlined, which ends up writing a bogus value
12:46
ronan__ is now known as ronan
12:50
<
cfbolz >
arigato: ouch
12:51
<
cfbolz >
arigato: I can fix it, but probably only tonight or tomorrow
12:52
<
arigato >
no problem. as I said I don't know if that's the problem
12:57
<
cfbolz >
arigato: sounds plausible at least
12:58
<
arigato >
not really
12:58
<
arigato >
because the values look like "4" instead of "19"
13:00
<
cfbolz >
And NaNs are more complex
13:10
<
arigato >
ah, no, I think I see the bug
13:13
<
arigato >
pff rare cases
13:14
<
arigato >
cfbolz: so handling many more floats than before just made the ppc bug slightly less rare
13:18
<
cfbolz >
arigato: right
13:18
<
cfbolz >
arigato: like the register allocator getting pushed too much?
13:19
<
arigato >
it's in jump.py, the register movement logic at the end of the trace
13:19
<
arigato >
the ppc variant only
13:19
<
arigato >
it calls regalloc_push/regalloc_pop for the cases where it needs to push/pop stuff temporarily on the stack
13:20
<
arigato >
but in ppc you need to pass in an index in case you push several ones
13:20
<
arigato >
of course it can occur that two different places in the code both pass index 0
13:29
<
cfbolz >
arigato: ouch
13:29
<
cfbolz >
arigato: do the random tests not stress that?
13:29
<
arigato >
I guess not enough?
13:30
<
arigato >
they should, but it takes quite some bad luck to get into the case
13:32
<
arigato >
can't try to run it more, py.test crashes for me on ppc
13:34
lritter has joined #pypy
13:44
Julian has joined #pypy
13:52
<
cfbolz >
arigato: we should fix the float storage anyway to be safe, right?
13:55
<
arigato >
also because convert_float_to_longlong operations in the JIT are not completely free
13:56
<
arigato >
so better make integers avoid it
14:12
<
cfbolz >
arigato: good point
14:13
<
cfbolz >
(we should be able to fuse getfield & cast to different getfield in the backend some how)
14:26
Julian has quit [Ping timeout: 252 seconds]
14:27
slav0nic has joined #pypy
14:28
Julian has joined #pypy
14:33
<
tumbleweed >
arigato: well done finding the PPC JIT bug, that looks about as gnarly as I expected it to be
14:40
stkrdknmibalz has quit [Quit: WeeChat 3.0.1]
15:42
lritter has quit [Ping timeout: 260 seconds]
17:53
stkrdknmibalz has joined #pypy
19:09
Ben10 has joined #pypy
19:14
Julian has quit [Quit: leaving]
19:15
Ben10 has quit [Quit: Client closed]
19:20
Ben10 has joined #pypy
19:33
Ben10 has quit [Ping timeout: 256 seconds]
20:09
trace987 has joined #pypy
20:13
<
trace987 >
how to debug if python3 and pypy3 bring different results?
21:15
otisolsen70 has quit [Quit: Leaving]
21:37
Julian has joined #pypy
22:19
Julian has quit [Quit: leaving]
22:26
trace987 has quit [Ping timeout: 260 seconds]
23:23
trace987 has joined #pypy
23:43
slav0nic has quit [Ping timeout: 260 seconds]