[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
Follow-up Comment #6, bug #20007 (project freeciv): Probably related thing I noticed a while ago: if fcdb is compiled in but not enabled, a command like /fcdb lua print('Hello') causes the server to segfault. '/fcdb reload' is not particularly happy either. I looked briefly at fixing it but it was tangled. Now covered by bug #21457. ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
Update of bug #20007 (project freeciv): Status: Ready For Test = Fixed Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
Update of bug #20007 (project freeciv): Status:None = Ready For Test Planned Release: = 2.4.0, 2.5.0 ___ Follow-up Comment #3: I don't know if this harmful or not, but certainly looks suspicious. That particular part is harmless, if redundant. luascript_destroy() checks against NULL parameter and does nothing. Attached patch removes the redundant call, and also fixes memory leak that has taken place in luascript_new() when it returned NULL. (file #17018) ___ Additional Item Attachment: File name: FreeStatelessFcl.patch Size:0 KB ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
Follow-up Comment #2, bug #20007 (project freeciv): Variable shadowing now handled in patch #3590 ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
Follow-up Comment #1, bug #20007 (project freeciv): Probably related thing I noticed a while ago: if fcdb is compiled in but not enabled, a command like /fcdb lua print('Hello') causes the server to segfault. '/fcdb reload' is not particularly happy either. I looked briefly at fixing it but it was tangled. ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #20007] script_fcdb_init() calls luascript_destroy(NULL)
URL: http://gna.org/bugs/?20007 Summary: script_fcdb_init() calls luascript_destroy(NULL) Project: Freeciv Submitted by: cazfi Submitted on: Mon 30 Jul 2012 07:23:44 PM EEST Category: general Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: ___ Details: I don't know if this harmful or not, but certainly looks suspicious. script_fcdb.c:196 checks that fcl certainly is NULL, and then calls luascript_destroy(fcl) Also, there's shadowing of module wide static variable fcl in some of the functions in this file. Shadowing should be avoided (I remember that we used to get compiler warning about it, wondering why it's not accepted) ___ Reply to this item at: http://gna.org/bugs/?20007 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev