Plugins appear to have stopped working in the latest release of ksh93- at least 
on 64-bit Linux.

Here is a very simple crude  "HelloWorld" example of a plugin:
#include <stdio.h>
intb_hello(int argc, char *argv[], void *extra){     if (argc != 2) {         
fprintf(stderr,"Usage: hello arg\n");         return(2);    }
    printf("Hello %s\n", argv[1]);    return(0);}
which is built as follows:
gcc -fPIC -g -c hello.c gcc -shared -W1,-soname,libhello.so -o libhello.so 
hello.o
Works fine on ksh83 Version JM 93t+ 2010-03-05 and earlier
$ ./ksh$ echo ${.sh.version}Version JM 93t+ 2010-03-05$ builtin -f 
./libhello.so hello$ hello worldHello there world$  
but core dumps on later versions of ksh93
$ /bin/ksh$ echo ${.sh.version}Version JM 93t+ 2010-06-21$  builtin -f 
./libhello.so helloMemory fault(coredump)
Program terminated with signal 11, Segmentation fault.#0  dllplugin (lib=0x0, 
name=0x177c531 "./libhello.so",     ver=<value optimized out>, rel=20100528, 
flags=1, path=0x0, size=0)    at 
/usr/src/debug/ksh-20100621/src/lib/libdll/dllplug.c:8282                   if 
(!dllcheck(dll, dle->path, rel))
Extensive work was recently done in libdll.  New source codefiles include 
dlllib.h, dllcheck.c, dllerror.c, dllplug.c.  
Is there now a requirement to have a version number on a plugin?  Do plugins 
need to be build differently?
- Finnbarr                                        
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to