Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0011861 [DCSS] Bug Report crash random 2019-02-07 17:13 2019-02-07 17:13
Reporter advil View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Branch 0.24 development branch
Summary 0011861: Lua error handling vs c++ stack
Description Currently, we use lua in C mode, by wrapping the header includes in an `extern` block. This causes lua to use setjmp/longjmp for error handling. This isn't a great idea for C++ code, and can lead to memory leaks or stack corruption. We should probably start using lua in c++ mode (which has worked in my tests, but would need a lot more testing). Nice summary of the state of affairs from a useful SO thread*: "setjmp()/longjmp() completely subvert stack unwinding and therefore exception handling as well as RAII (destructors in general)."

When bad longjmp calls happen, they result in pretty opaque crashlogs (usually with an empty or uninterpretable stack), and even when run in a debugger don't usually result in an interpretable stack trace, so based on some recent experience with these crashes (see [^] ), I wouldn't be surprised if many of the more opaque crashlogs we encounter could be related.

[*] [^]
Additional Information
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-02-07 17:13 advil New Issue

Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker