View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000325 | luatex | luatex bug | public | 2010-01-31 20:47 | 2010-03-12 15:46 |
Reporter | patrick | Assigned To | Taco | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.51.0 | ||||
Summary | 0000325: lpeg/coroutines segfaults on 64 bit Linux (Ubuntu 9.04) | ||||
Description | This segfaults on Linux ubuntu 2.6.28-11-generic 0000042-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux luatex --luaonly thisfile.lua ------ function parse() local grammar = lpeg.P{ "one", one = lpeg.V"two" / function() end, two = lpeg.V"three" / function() end, three = lpeg.V"four" / function() end, four = lpeg.C(lpeg.P("5")) / tonumber, } lpeg.match(grammar,"5") print("ok?") coroutine.yield() end coroutine.resume(coroutine.create(parse)) ------ luatex trunk svn revision 3412 | ||||
Additional Information | Something similar also crashes on MacOS X | ||||
Tags | No tags attached. | ||||
|
I didn't succeed in reproducing this error in lua + lpeg from the ubuntu distribution directly. |
|
I don't even succeed in reproducing the error with luatex r3415 on another linux64 (mandriva 2009.0): Linux ntg 2.6.27.21-desktop-1mnb 0000001 SMP Thu May 14 18:28:41 EDT 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ GNU/Linux Can you post a gdb stack backtrace? |
2010-02-03 12:47
|
|
2010-02-03 12:53
|
|
|
backtrace2.log is the correct backtrace from luatex --luaonly ... |
|
When I compile luatex with CFLAGS="-O0 -g" this file does not segfault, but other testfiles do (both 64bit OS X and 64bit Linux, as above). |
|
Unable to reproduce this, sorry |
|
This crashed on my own amd64: function parse() local grammar = lpeg.P{ "one", one = lpeg.V"two" / function() end, two = lpeg.V"three" / function() end, three = lpeg.V"four" / function() end, four = lpeg.V"five" / function() end, five = lpeg.V"six" / function() end, six = lpeg.C(lpeg.P("5")) / tonumber, } lpeg.match(grammar,"5") print("ok?") coroutine.yield() end coroutine.resume(coroutine.create(parse)) |
|
The problem was the C stack created by the coroutine was too small. I raised it from 64K to 1M (at a guess) and now the test file runs without problems. If you need an even larger stack, use coroutine.cstacksize() to set a new value. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-01-31 20:47 | patrick | New Issue | |
2010-01-31 21:00 | patrick | Note Added: 0000406 | |
2010-02-03 12:08 | Taco | Note Added: 0000409 | |
2010-02-03 12:09 | Taco | Status | new => feedback |
2010-02-03 12:47 | patrick | File Added: backtrace.log | |
2010-02-03 12:53 | patrick | File Added: backtrace2.log | |
2010-02-03 12:53 | patrick | Note Added: 0000411 | |
2010-02-03 14:31 | patrick | Note Added: 0000415 | |
2010-02-03 16:48 | Taco | Note Added: 0000416 | |
2010-02-03 16:48 | Taco | Status | feedback => closed |
2010-02-03 16:48 | Taco | Resolution | open => unable to reproduce |
2010-02-05 12:00 | Taco | Note Added: 0000417 | |
2010-02-05 12:00 | Taco | Assigned To | => Taco |
2010-02-05 12:00 | Taco | Status | closed => assigned |
2010-02-05 12:06 | Taco | Note Added: 0000418 | |
2010-02-05 12:06 | Taco | Status | assigned => resolved |
2010-02-05 12:06 | Taco | Resolution | unable to reproduce => fixed |
2010-02-05 12:12 | Taco | Note Edited: 0000418 | |
2010-03-12 15:46 | Taco | Fixed in Version | => 0.51.0 |
2010-03-12 15:46 | Taco | Status | resolved => closed |