[Vm-dev] sqUnixExternalPrims.c tryLoading()

Chris Cunnington brasspen at gmail.com
Fri Aug 7 21:29:24 UTC 2015


The argument libName in tryLoading() in my interpreter vm build is: 

$3 = "/home/ooplu/Desktop/Int_Debug//so.vm-display-X11", '\000' <repeats 608 tim
es>…

This works. 

The argument libName in tryLoading() in my Cog vm build is:
 
$15 = "/home/ooplu/Desktop/Cog_build2/products/coglinuxht/lib/squeak/4.0-3256/vm
-display-X11\000\367\000\320\377\367p\003\373\367\000\000\000\000Xh\375\367\025\
202\376\367\020j\375\367\000\000\000\000\001\000\000\000\001\000\000\000\000\000
\000\000\272\360\371\367\000@\373\367@\255\377\377X@\373\367\260\004\373\367D@\3
73\367\026\000\000\000\t\261\337\367\000\020\364\367@\030\364\367HK\371\367\310\
335\037\b\237\334\337\367[\201\376\367\000@\373\367\210\321\037\b\367\361\371\36
7\240\255\377\377\220"...

Is there something obviously wrong with this argument path? I’m not enough of a C programmer to know. Are those numbers past the argument string garbage chars making it impossible for dlopen() to function? 		

dirName and moduleName go into sprintf looking fine and they come out a weird libName which does not provide a handle. 

		n = sprintf( libName, "%s%s%s%s”, dirName, *prefix, moduleName, *suffix ); 
		assert(n >= 0 && n < NAME_MAX + 32);

Chris 


More information about the Vm-dev mailing list