Bug 24047 - Mono's vectored exception handlers return EXCEPTION_CONTINUE_EXECUTION, skipping an application's exception handling on Wine
Summary: Mono's vectored exception handlers return EXCEPTION_CONTINUE_EXECUTION, skipp...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-24 17:33 UTC by Joachim P.
Modified: 2016-04-14 13:30 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample Delphi program (source code) (760 bytes, application/x-wine-extension-dpr)
2014-10-24 17:33 UTC, Joachim P.
Details
Sample Delphi program (executable) (42.50 KB, application/octet-stream)
2014-10-24 17:33 UTC, Joachim P.
Details
DLL for the sample program, to be placed in the same directory (4.50 KB, application/x-msdownload)
2014-10-24 17:34 UTC, Joachim P.
Details
Log file (trace+seh) of two executions of the sample program, one without the DLL, one with the DLL (4.05 KB, text/x-log)
2014-10-24 17:37 UTC, Joachim P.
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Joachim P. 2014-10-24 17:33:00 UTC
Created attachment 8503 [details]
Sample Delphi program (source code)

Got directed here from the Wine bugzilla: https://bugs.winehq.org/show_bug.cgi?id=37438

I have a Delphi sample program (see attachment) that raises and catches an exception while a .NET DLL. is loaded. On Linux/Wine, Mono is used to load this DLL.

When not loading the DLL, everything works fine. When the DLL is loaded, Mono installs its own vectored exception handler that catches the raised exception and returns EXCEPTION_CONTINUE_EXECUTION, bypassing the application's own stack-based exception handler which leads to a crash.

To reproduce: Have Wine and wine-mono installed, run "WINEDEBUG=trace+seh wine Project1.exe" with the sample dll in the same folder as Project1.exe. [Press Enter once after the dll version output to continue the execution of the program.] The program crashes with the message "err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.". When renaming or removing the DLL, the program does not crash.
Comment 1 Joachim P. 2014-10-24 17:33:31 UTC
Created attachment 8504 [details]
Sample Delphi program (executable)
Comment 2 Joachim P. 2014-10-24 17:34:12 UTC
Created attachment 8505 [details]
DLL for the sample program, to be placed in the same directory
Comment 3 Joachim P. 2014-10-24 17:37:51 UTC
Created attachment 8506 [details]
Log file (trace+seh) of two executions of the sample program, one without the DLL, one with the DLL
Comment 4 Joachim P. 2016-04-14 13:30:05 UTC
Cannot reproduce any more with wine-1.9.7-156-g1c201a9 + corresponding wine-mono.