2017-06-02 22:21 GMT+02:00 Nicolas Cellier <
[email protected]>:

> Follow up: it's not enough...
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000051cfc8 in dir_EntryLookup (pathString=0xce7edb0
> "X:\\Smalltalk\\opensmalltalk-vm\\build.win64x64\\pharo.cog.spur\\builddbg\\vm",
> pathLength=71,
>     nameString=0xce81868 "PharoV60.sources", nameStringLength=16,
> name=0xfe5aa0 "", nameLength=0xfe5a98, creationDate=0xfe5ba8,
> modificationDate=0xfe5a88,
>     isDirectory=0xfe5ba0, sizeIfFile=0xfe5a90, posixPermissions=0x0,
> isSymlink=0x0) at ../../platforms/win32/vm/sqWin32Directory.c:397
> 397       *posixPermissions = 0;
>
> I'll have to understand why those PharoVM last 2 args are zero...
>

It looks like FilePlugin did not have the -DPharoVM because the backtrace
point at the wrong #ifdef branch:

(gdb) bt
#0  dir_EntryLookup (pathString=0xc27edb0
"X:\\Smalltalk\\opensmalltalk-vm\\build.win64x64\\pharo.cog.spur\\builddbg\\vm",
pathLength=71,
    nameString=0xc281868 "PharoV60.sources", nameStringLength=16,
name=0xfe5aa0 "ryEntry", nameLength=0xfe5a98, creationDate=0xfe5ba8,
    modificationDate=0xfe5a88, isDirectory=0xfe5ba0, sizeIfFile=0xfe5a90,
posixPermissions=0x0, isSymlink=0x0)
    at ../../platforms/win32/vm/sqWin32Directory.c:379
#1  0x00000000005835a6 in primitiveDirectoryEntry () at
../../src/plugins/FilePlugin/FilePlugin.c:654
#2  0x0000000000442d5e in primitiveExternalCall () at
../../spur64src/vm/gcc3x-cointerp.c:76521
#3  0x000000000040d8ba in interpret () at
../../spur64src/vm/gcc3x-cointerp.c:6373
#4  0x0000000000429046 in enterSmalltalkExecutiveImplementation () at
../../spur64src/vm/gcc3x-cointerp.c:18181
#5  0x00000000004018a8 in interpret () at
../../spur64src/vm/gcc3x-cointerp.c:2678
#6  0x00000000005279a8 in sqMain (argc=1, argv=0x11850f0) at
../../platforms/win32/vm/sqWin32Main.c:1572
#7  0x0000000000527e95 in WinMain (hInst=0x400000, hPrevInstance=0x0,
lpCmdLine=0x11f3f32 "", nCmdShow=10) at
../../platforms/win32/vm/sqWin32Main.c:1678
#8  0x00000000004013ed in __tmainCRTStartup () at
/usr/src/debug/mingw64-x86_64-runtime-5.0.2-1/crt/crtexe.c:334
#9  0x00000000004014fb in WinMainCRTStartup () at
/usr/src/debug/mingw64-x86_64-runtime-5.0.2-1/crt/crtexe.c:184

(gdb) up
#1  0x00000000005835a6 in primitiveDirectoryEntry () at
../../src/plugins/FilePlugin/FilePlugin.c:654
654                     status = dir_EntryLookup(pathNameIndex,
pathNameSize, reqNameIndex, reqNameSize,

(gdb) list 646,658
646
647     #    if PharoVM
648                     status = dir_EntryLookup(pathNameIndex,
pathNameSize, reqNameIndex,
reqNameSize,
649
entryName, &entryNameSize, &createDate,
650
&modifiedDate, &dirFlag, &fileSize,
651
&posixPermissions, &symlinkFlag);
652
653     #    else /* PharoVM */
654                     status = dir_EntryLookup(pathNameIndex,
pathNameSize, reqNameIndex, reqNameSize,
655
entryName, &entryNameSize, &createDate,
656
&modifiedDate, &dirFlag, &fileSize);
657
658     #    endif /* PharoVM */

The backtrace should never be at 654!!!



>
> 2017-06-02 17:15 GMT+02:00 Nicolas Cellier <nicolas.cellier.aka.nice@
> gmail.com>:
>
>> Hi Henrik,
>> good catch!
>>
>> platforms/Cross/plugins/FilePlugin/FilePlugin.h says:
>>
>> sqInt dir_EntryLookup(char *pathString, sqInt pathStringLength, char
>> *nameString, sqInt nameStringLength,
>>         /* outputs: */
>>         char *name, sqInt *nameLength, sqInt *creationDate, sqInt
>> *modificationDate,
>>         sqInt *isDirectory, squeakFileOffsetType *sizeIfFile, sqInt
>> *posixPermissions, sqInt *isSymlink);
>>
>> platforms/win32/vm/sqWin32Directory.c says
>>
>> int dir_EntryLookup(char *pathString, int pathLength, char* nameString,
>> int nameStringLength,
>> /* outputs: */ char *name, int *nameLength, int *creationDate, int
>> *modificationDate,
>>                     int *isDirectory, squeakFileOffsetType *sizeIfFile,
>> sqInt *posixPermissions, sqInt *isSymlink)
>>
>>
>> int* and sqInt* are not going to be a good match on 64 bits...
>> But I don't know how the WIN64 Squeak VM could possibly work, because
>> prototypes are equally wrong (just with two parameters less).
>> And the two paramters added by Pharo are correct!!!
>>
>> Maybe there is another bug, I will modify the easy part and commit ASAP.
>>
>> In the long term, we shall include the .h containing declarations into
>> the .c implementing the functions and use more agressive -C99 flags forcing
>> the prototypes to be defined.
>>
>>
>> 2017-06-02 14:48 GMT+02:00 Henrik Sperre Johansen <
>> [email protected]>:
>>
>>> The Windows 64 Pharo VM crashes when loading images*.
>>> The Windows 64 Squeak VM runs Pharo images just fine, but lacks some
>>> plugins
>>> (FT2 from Pharo build works, and can be copied over, SqueakSSL is MiA).
>>> Great work!
>>>
>>> Cheers,
>>> Henry
>>>
>>> *Crash occurs when loading sources;
>>> Stack backtrace:
>>>         [0000000000495063] dir_EntryLookup + 0x83 in Pharo.exe
>>>
>>> Smalltalk stack dump:
>>>           0xb4f568 I WindowsStore(DiskStore)>basicEntryAt: 0x9a711c0:
>>> a(n)
>>> WindowsStore
>>>           0xb4f5b8 I WindowsStore(DiskStore)>nodeAt:ifPresent:ifAbsent:
>>> 0x9a711c0: a(n) WindowsStore
>>>           0xb4f610 I WindowsStore(FileSystemStore)>exists: 0x9a711c0:
>>> a(n)
>>> WindowsStore
>>>           0xb4f658 I FileSystem>exists: 0x9a711d8: a(n) FileSystem
>>>           0xb4f6a0 I FileReference>exists 0x9a77400: a(n) FileReference
>>>           0xb4f6e0 I FileLocator(AbstractFileReference)>exists
>>> 0x9a76678:
>>> a(n) FileLocator
>>>           0xb4f730 M [] in PharoFilesOpener>openSources:forImage:
>>> 0xaca7168:
>>> a(n) PharoFilesOpener
>>>
>>> so I assume it's related to additional functionality in
>>> <primitive: 'primitiveDirectoryEntry' module: 'FilePlugin'> in the Pharo
>>> build.
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://forum.world.st/please-t
>>> est-download-for-Pharo-6-0-tp4948720p4948965.html
>>> Sent from the Pharo Smalltalk Developers mailing list archive at
>>> Nabble.com.
>>>
>>>
>>
>

Reply via email to