Paste: strange fib-count behavior
Author: | kenanb |
Mode: | factor |
Date: | Fri, 12 Nov 2010 14:21:02 |
Plain Text |
( scratchpad ) : fib-count ( a b -- x y ) [ dup 4000000 <= ] [ [ + ] keep swap ] while ;
( scratchpad ) 0
--- Data stack:
0
( scratchpad ) 1
--- Data stack:
0
1
( scratchpad ) fib-count
--- Data stack:
3524578
5702887
( scratchpad ) clear
( scratchpad ) : fib-count2 ( -- x y ) 0 1 [ dup 4000000 <= ] [ [ + ] keep swap ] while ;
( scratchpad ) fib-count2
--- Data stack:
3524578
5702887
( scratchpad )
Author: | kenanb |
Mode: | text |
Date: | Fri, 12 Nov 2010 14:46:07 |
Plain Text |
if i first define fib-count and then fib-count2, both work, if i open factor again and directly define fib-count2 and run it, factor freezes, the os is Win7 x64, otoburb reported similar behavior in vista x64. I tried to run the problematic code from a .factor file, frozen again.
Author: | kenanb |
Mode: | text |
Date: | Fri, 12 Nov 2010 15:16:56 |
Plain Text |
i don't know if it is related or what meant by strace log. but i couln't find an exact equivalent of strace to win, so maybe this helps
"Frame","Module","Location","Address","Path"
"0","ntoskrnl.exe","NtSetInformationProcess + 0x1c72","0xfffff80002f8ff42","C:\Windows\system32\ntoskrnl.exe"
"1","ntoskrnl.exe","NtTraceControl + 0x2173","0xfffff80002f71277","C:\Windows\system32\ntoskrnl.exe"
"2","ntoskrnl.exe","KeSynchronizeExecution + 0x3a43","0xfffff80002cc4993","C:\Windows\system32\ntoskrnl.exe"
"3","ntdll.dll","NtCreateUserProcess + 0xa","0x771f082a","C:\Windows\System32\ntdll.dll"
"4","kernel32.dll","CreateProcessInternalW + 0x87d","0x7709ae7d","C:\Windows\System32\kernel32.dll"
"5","kernel32.dll","CreateProcessW + 0x6c","0x7709e81c","C:\Windows\System32\kernel32.dll"
"6","shell32.dll","PathResolve + 0x175d","0x7fefda6df4d","C:\Windows\System32\shell32.dll"
"7","shell32.dll","PathResolve + 0x14cb","0x7fefda6dcbb","C:\Windows\System32\shell32.dll"
"8","shell32.dll","PathResolve + 0x136b","0x7fefda6db5b","C:\Windows\System32\shell32.dll"
"9","shell32.dll","PathResolve + 0x1287","0x7fefda6da77","C:\Windows\System32\shell32.dll"
"10","shell32.dll","PathResolve + 0x46e","0x7fefda6cc5e","C:\Windows\System32\shell32.dll"
"11","shell32.dll","SHCreateShellItemArrayFromShellItem + 0xdac","0x7fefda82180","C:\Windows\System32\shell32.dll"
"12","shell32.dll","SHCreateShellItemArrayFromShellItem + 0xc7f","0x7fefda82053","C:\Windows\System32\shell32.dll"
"13","shell32.dll","OpenRegStream + 0xea8","0x7fefda83f28","C:\Windows\System32\shell32.dll"
"14","shell32.dll","OpenRegStream + 0x10af","0x7fefda8412f","C:\Windows\System32\shell32.dll"
"15","shell32.dll","OpenRegStream + 0xfe7","0x7fefda84067","C:\Windows\System32\shell32.dll"
"16","shell32.dll","OpenRegStream + 0x7be","0x7fefda8383e","C:\Windows\System32\shell32.dll"
"17","shell32.dll","OpenRegStream + 0x656","0x7fefda836d6","C:\Windows\System32\shell32.dll"
"18","shell32.dll","Ordinal813 + 0x6ee8","0x7fefde5570c","C:\Windows\System32\shell32.dll"
"19","shell32.dll","Ordinal813 + 0x7343","0x7fefde55b67","C:\Windows\System32\shell32.dll"
"20","shlwapi.dll","SHRegGetUSValueW + 0x306","0x7feff43c8ea","C:\Windows\System32\shlwapi.dll"
"21","kernel32.dll","BaseThreadInitThunk + 0xd","0x7709f56d","C:\Windows\System32\kernel32.dll"
"22","ntdll.dll","RtlUserThreadStart + 0x21","0x771d3021","C:\Windows\System32\ntdll.dll"
New Annotation