<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: x-small;">
<div style="font-size: small; "><font face="Times New Roman" size="3">Hi,</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">We are currently porting our application to Windows 64 bits (amd64), and we are getting regressions from 32 bits relatively to LLVM </font><font face="Times New Roman" size="3">3.0's ability
 to get traversed by "foreign" Visual Studio C++ exceptions. That is, there is a crash when C++ exceptions which are thrown from </font><font face="Times New Roman" size="3">Visual Studio code, are unwinding through LLVM code before being eventually catch by
 other Visual Studio code (more details below).</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">I am not an expert on the subject of exceptions, however I was not able to find clear answers about this specific issue. Should it be supported, and if not, is</font><font face="Times New Roman" size="3"> there
 is any planned effort from the LLVM team to work on this? </font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">Note that we are not using the LLVM3.0 exception API (launchingPad with personality routine). In fact, this leads to another related question: is there even a "personality routine" available
 when compiling with Visual Studio? From what I read it looks like this would require support for Windows' SEH, which is not implemented yet. Any news or plans on that front? SEH was mentionned in the design discussion of LLVM3.0's exception API, without mentioning
 any plans to support it: http://groups.google.com/group/llvm-dev/browse_thread/thread/b7fc0999e9f11b8f/2cc43ddaba3bcff6?lnk=gst&q=SEH+exception#2cc43ddaba3bcff6</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">More details about the crash:</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">I was able to repro the issue simply by modifying the Fibonacci example to call an external C++ function which throws an </font><font face="Times New Roman" size="3">exception, much like
 in ExceptionsDemo.cpp: works on 32 bits but not on 64 bits Visual Studio. The crash happens within Windows' _cxxThrowException routine. I read that the 64 bits </font><font face="Times New Roman" size="3">exception handling in Windows is doing some unwinding
 in a different fashion than on 32 bits (as explained here: </font><font face="Times New Roman" size="3">http://lackingrhoticity.blogspot.ca/2011/11/stack-unwinding-risks-on-64-bit-windows.html). In particular, this blog seems to </font><font face="Times New Roman" size="3">state
 that exceptions won't unwind properly through functions that don't provide some unwind info, which is the case for </font><font face="Times New Roman" size="3">LLVM I guess.</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">Thank you,</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3">Jerome Couture-Gagnon</font></div>
<div style="font-size: small; "><font face="Times New Roman" size="3"><br>
</font></div>
</div>
</body>
</html>