[squeak-dev] FFI issue in Squeak 4.2 ?

Ken G. Brown kbrown at mac.com
Mon Feb 21 02:53:28 UTC 2011

In Sq 4.2 Help/Extending the system Workspace, there is a script to load FFI and friends:

"FFI: http://source.squeak.org/FFI.html"
(Installer repository: 'http://source.squeak.org/FFI')
	install: 'FFI-Pools';
	install: 'FFI-Kernel';
	install: 'FFI-Tests';
	install: 'FFI-Win32';
	install: 'FFI-MacOS';
	install: 'FFI-Unix'.

Ken G. Brown

At 9:26 PM -0500 2/20/11, mkobetic at gmail.com apparently wrote:
>"Levente Uzonyi"<leves at elte.hu> wrote:
>> There's no need to turn off #allowUnderscoreAsAssignment if the code is
>> not ambiguous (it's not).
>I was getting desperate, so I was trying whatever could possibly make a difference :-). I'll clean it up again.
>> The need for the global
>> #allowUnderscoreSelectors is because of MC. It tries to load EVPMD >>
>> #'block_size' before EVPMD class >> #allowUnderscoreSelectors which won't
>> work.
>> IMHO it's better to just use the global preference, since the per class
>> methods are not good enough.
>> FFI is fine. The cause of the problem is String >> #numArgs. $_ is not
>> accepted by it as a valid selector character, so it returns -1 instead of
>> 1 for #'HMAC_CTX_cleanup:'. It will be fixed in the Trunk soon, along
>> with the other underscore related problems.
>> I doubt FFI will be preloaded in images, because it has some security risk.
>Security risks that outweigh benefits of having the ability to call the outside world without much hassle? I'm curious, but it sounds like the community already had this argument and decided it's not worth it. No need to stir up old arguments, I'll see if I can find something in the archives.
>> However there's a simple solution: Metacello. A Metacello
>> configuration can ensure that FFI is loaded before the FFI specific parts
>> are loaded, take care about platform specific stuff, like changing the
>> preferences, etc.
>Hm, so if I create a metacello configuration and assuming there are some pre/post load hooks, can I turn the global flag on just for the duration of the load ? I prefer not to mess with global state of people's images if it can be avoided (I mean beyond adding a pile of new code to it :-).
>> I managed to load XTreams to Squeak Trunk (possibly works with 4.2 too)
>> using the following script:
>> ...
>> I also uploaded a new version of Xtreams-Xtras to the repository which
>> fixes XTHMACTest and XTHashTest for Squeak.
>> With these changes, all tests are green on Windows.
>Excellent! So that means the new Bcrypt based hashing worked for you too. Thank you very much! I really appreciate your help.

More information about the Squeak-dev mailing list