enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
Date: Wed, 26 Jul 2006 22:04:36 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi,

Tacvek schrieb:
Ok. I just got an Enigma version to work correctly with a C++ lua build. :D
Works correctly as in does not crash on any of those tests.

Great!

Hmm.. no reply yet, so i'm just going to attach the patches, and resummarize.

Sorry that I couldn't answer yesterday to this wonderful news. Will you send the patches to me directly?

Either of the patches can be used to stop the crashing on Windows.

The patch called simple compiles liblua as C++ and disables building the tolua++ tool
for all MingW32 compiles.

The patch named complex is my preffered patch. It adds a new configure option: --enable-cxxlua/--disable--cxxlua. This option causes liblua to be compiled as C++ and disbales building the tolua++ tool. It defaults to disabled, except on MingW32,
where it defaults to enabled.

The second patch would be the preferable patch.

I compile on Windows, too. But it is not essential to build a Windows
tolua++ within Enigma. Is a tolua++ build possible with your "--disable-cxxlua" on Windows?

Both patches require editing two files that enigma does not own, namely luaconf.h
and tolua++.h.

The changes to those files only take effect when compiling as c++ so this should not
bother any downstreams.

However, it is a slight pain for us, as it is something we have to rember whenever we update lua or tolua++. To that end, I would suggest adding a new directory to version control, but not telling the build system about it, so it gets ignored and is not included in source tarballs, that contains the diffs agains the clean upstream versions of those files. Then whenever we update either of those we only need to remember that after copying the files over, we must reapply the patches.

The diffs between the modified *.h and the original ones are stored in the repository either way and can be extracted at every point of time. So we can merge them on new versions of Lua and tolua++ without problems.

I think we can safely say that the bug is part of MingW32 and appears to occur when throwing an exceptions shortly after a longjmp, under a specific set of circumstances.

Yeah - this "proofs" our assumption that the problem is located in
MinGW's handling of mixed C and C++ exceptions. Will you or should I
report the problem to the MinGW group?

Great work!

- Ronald

P.S.: The patches just arrived. Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]