[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Luaproc
- From: Ken Smith <kgsmith@...>
- Date: Tue, 13 Jul 2010 14:15:36 -0700
I excitedly read the Luaproc paper:
http://www.inf.puc-rio.br/~roberto/docs/ry08-05.pdf
and decided to try it. I've run into some trouble. First my environment.
Lua 5.1.4-2 (built as C++)
GCC 4.0
Luaproc-1.0b1 (built as C++)
Mac OS X 10.6.3 (Darwin 10.3.0)
Firstly, I ran into a couple issues building Luaproc. On OS X,
/usr/include/pthread.h includes a file called sched.h so I had to
rename Luaproc's sched.h to something else. Also, because I built Lua
as C++, I needed to build Luaproc as C++ so I had to extern "C"
luaopen_luaproc. Finally, I had to add -bundle -undefined
dynamic_lookup to the link per
http://lua-users.org/wiki/BuildingModules despite that page's own
indication to the contrary.
Once that was up and running, I wrote this into experiment.lua:
require "luaproc"
EOF
This segfaults:
(gdb) run ../experiment.lua
Starting program:
/Users/ken/Development/External_SDKs/lua/built_libs/bin/lua
../experiment.lua
Reading symbols for shared libraries +++.. done
Reading symbols for shared libraries . done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0006d164
[Switching to process 41790]
0x94222d9f in _pthread_cond_wait ()
(gdb) bt
#0 0x94222d9f in _pthread_cond_wait ()
#1 0x9426b42f in pthread_cond_wait ()
#2 0x0006a91d in ?? ()
#3 0x94222a19 in _pthread_start ()
#4 0x9422289e in thread_start ()
If I change experiment.lua to this:
require "luaproc"
luaproc.exit()
EOF
It exits normally. For now, I'll take care to give Luaproc a chance
to clean up by always calling exit() but I thought the developers
would like to know of this behavior. Please let me know if you would
like more information.
Regards,
Ken