Re: LuaJIT crashes on C++ exceptions in Visual Studio 32 bit mode

  • From: Peter Cawley <corsix@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 25 Apr 2016 22:51:08 +0100

Taking those binaries and running them locally, the test runs just
fine - so there is something odd about those binaries in an Appveyor
environment rather than something odd about those binaries in every
environment. I'm tempted to suggest something along the lines of
https://www.appveyor.com/docs/how-to/rdp-to-build-worker - contact me
off-list if you'd like to explore that avenue.

On Mon, Apr 25, 2016 at 1:16 AM, Nagaev Boris <bnagaev@xxxxxxxxx> wrote:

On Mon, Apr 25, 2016 at 1:32 AM, Peter Cawley <corsix@xxxxxxxxxx> wrote:
I'm not having any luck reproducing the problem locally (despite using
hererocks.py, having MSVC 2015 - albeit build number 23506 rather than
23918 -, and targeting x86). Could you convince Appveyor to give out
lua.exe/lua51.dll/throw.dll as artifacts?

Hi Peter,

I uploaded directory "here" from AppVeyor to GitHub releases:
https://github.com/starius/luajit-vs32-throw/releases/download/1.0.5/here.tar.gz


On Sun, Apr 24, 2016 at 10:38 PM, Nagaev Boris <bnagaev@xxxxxxxxx> wrote:
On Mon, Apr 25, 2016 at 12:02 AM, Peter Cawley <corsix@xxxxxxxxxx> wrote:
I'm somewhat concerned by the following in your output log:
```
throw.cpp(5): warning C4530: C++ exception handler used, but unwind
semantics are not enabled. Specify /EHsc
```

Thank you, Peter!

I specified CFLAGS=/EHsc fixing the warning, but the crash still exists:

https://ci.appveyor.com/project/starius/luajit-vs32-throw/build/1.0.5/job/4weju0t18ae2asn7


On Sun, Apr 24, 2016 at 9:55 PM, Nagaev Boris <bnagaev@xxxxxxxxx> wrote:
Hi,

my C++ code throws C++ exceptions, so I wrap throwing code with
try-catch and throw Lua error in the catch block. It works in Rio Lua,
but it crashes in LuaJIT under the following conditions:

  * Visual Studio
  * 32 bit mode
  * multiple exceptions thrown, not one. It crashes after second 
exception.

I created a github project to demonstrate this problem:

https://github.com/starius/luajit-vs32-throw/

The log: 
https://ci.appveyor.com/project/starius/luajit-vs32-throw/build/job/ci3m1bf9cge8b4o4

--
Best regards,
Boris Nagaev





--


Best regards,
Boris Nagaev





--


Best regards,
Boris Nagaev


Other related posts: