dll woes

new topic     » topic index » view thread      » older message » newer message

Can someone either tell me what I am doing wrong here, or confirm that there is a bug?

-- contents of file number1.shared,  
-- euc -so number1.shared produces number1.so 
 
export function call_one() 
return "This is a message from function n1\n" 
end function 
 
-- contents of number2.shared, 
-- euc -so number2.shared produces number2.so 
 
export function funk_two() 
return "This is a message from function n2\n" 
end function 

Here is the test program, dlltest.ex:

 
include std/dll.e 
 
atom libx = open_dll("./number1.so") 
printf(1,"open dll 1 returns %d\n",libx) 
 
atom liby = open_dll("./number2.so") 
printf(1,"open dll 2 returns %d\n",liby) 
 
atom fx = define_c_func(libx,"call_one",{},E_SEQUENCE) 
printf(1,"function call 1 is %d\n",fx)  
 
atom fy = define_c_func(liby,"funk_two",{},E_SEQUENCE) 
printf(1,"function call 2 is %d\n",fy) 
          

Here are the results when running eui dlltest.ex:
open dll 1 returns 27362528
open dll 2 returns 27413312
function call 1 is 19
function call 2 is 20
Error in `eui': double free or corruption (fasttop): 0x00000000019bde60
Aborted

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu