The following code crashes the VM:

i:=0.
[ FileDirectory new primLookupEntryIn: 'C:' index: i] whileNotNil: [ i:= i+1].
FileDirectory new primLookupEntryIn: 'C:' index: i+1

The reason is that the dirCacheHit path in sqWin32Directory.c is taken and FindNextFileW is called with findHandle == NULL.

Additionally, primLookupEntryIn accepts negative indices, which means this works but probably should not:

FileDirectory new primLookupEntryIn: 'C:' index: -1.
FileDirectory new primLookupEntryIn: 'C:' index: 0.
(FileDirectory new primLookupEntryIn: 'C:' index: 1) ~~(FileDirectory new primLookupEntryIn: 'C:' index: 1) "= true" 


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.