URL:
  <http://gna.org/bugs/?20385>

                 Summary: Using subnamespaces with [set_global_variable]
causes invalid memory access
                 Project: Battle for Wesnoth
            Submitted by: shadowmaster
            Submitted on: Mon 24 Dec 2012 06:09:57 PM CLST
                Category: Bug
                Severity: 5 - Blocker
                Priority: 5 - Normal
              Item Group:  None of the others
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.10.x, 1.11.x
        Operating System: Linux, Mac OS X

    _______________________________________________________

Details:

Using subnamespaces like "Namespace.Subnamespace" with the
[set_global_variable] WML action (http://wiki.wesnoth.org/PersistenceWML)
causes a series of invalid memory access operations that may result in a
segmentation fault either immediately, or after a while (even when running
unrelated code).

I had first spotted this issue in my add-on After the Storm on Linux, and
vultraz confirmed that the issue also affects Mac OS X. The only known
workaround (which I have been using since then) is to not use real
subnamespaces, e.g. by replacing the above with "Namespace_Subnamespace". This
issue affects current 1.10.x versions, as well as 1.11.x/trunk.

I have published a single-file add-on with the minimum code necessary to
trigger the issue on a Wesnoth-UMC-Dev branch:

http://wesnoth-umc-dev.svn.sourceforge.net/viewvc/wesnoth-umc-dev/branches/testing/trunk/PersistenceWML_Memcheck_Test_Case/

Click on "Download GNU Tarball" after the file listing on that page to
download the add-on. The instructions and triggering WML can be found inside
the _main.cfg file.

I have run this code with a debug build on Valgrind and encountered a flood of
invalid memory access warnings after the point at which the
[set_global_variable] action is executed. The triggering code is in fact the
PersistenceWML implementation, but it is too dense for me to try to find the
cause.

I have attached the relevant portion of the Valgrind output to this bug
report.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 24 Dec 2012 06:09:57 PM CLST  Name:
persistencewml_memcheck_portion.log.gz  Size: 5kB   By: shadowmaster

<http://gna.org/bugs/download.php?file_id=16870>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20385>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to