View Issue Details

IDProjectCategoryView StatusLast Update
0000406LDMud 3.3Runtimepublic2018-01-29 21:57
ReporterGnomi Assigned Tolars 
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.1
Product Version3.3 
Fixed in Version3.3 
Summary0000406: Infinite recursion caused by errorf.
DescriptionAn out of memory error within a catch() may cause an infinite recursion:

Program terminated with signal 11, Segmentation fault.
(gdb) bt
#0 0x400d3561 in vfprintf () from /lib/libc.so.6
0000001 0x400ec0c3 in vsprintf () from /lib/libc.so.6
0000002 0x080de975 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:771
0000003 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
0000004 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
0000005 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
0000006 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
0000007 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
0000008 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
0000009 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
0000010 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
0000011 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
0000012 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
0000013 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
#14 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
    at simulate.c:787
#15 0x0807d656 in put_c_string (sp=0x811c944,
    p=0x81cde40 "*(interpret.c:2633) Out of memory (56 bytes) for string\n")
    at interpret.c:2633
#16 0x080de9b9 in errorf (
    fmt=0x8100760 "(%s:%d) Out of memory (%lu bytes) for %s\n")
 at simulate.c:78Quit

... and so on.

To save the error message for catch errorf() tries to allocate memory and thus causing an out of memory error again.

Greetings,
Gnomi
TagsNo tags attached.

Activities

lars

2005-10-09 23:01

reporter   ~0000392

I have added code to check for an out-of-memory situation, in which case the catch() will be ignored. This should keep the driver up long enough to run a GC.

Issue History

Date Modified Username Field Change
2005-10-07 05:02 Gnomi New Issue
2005-10-09 23:01 lars Status new => resolved
2005-10-09 23:01 lars Fixed in Version => 3.3
2005-10-09 23:01 lars Resolution open => fixed
2005-10-09 23:01 lars Assigned To => lars
2005-10-09 23:01 lars Note Added: 0000392
2005-11-24 14:32 lars Status resolved => closed
2010-11-16 09:42 lars Source_changeset_attached => ldmud.git master ffad1853
2018-01-29 18:59 lars Source_changeset_attached => ldmud.git master ffad1853
2018-01-29 21:57 lars Source_changeset_attached => ldmud.git master ffad1853