[LLVMbugs] [Bug 13579] New: Error in cleanup code for exception handling with volatile array type.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Aug 11 07:49:13 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13579
Bug #: 13579
Summary: Error in cleanup code for exception handling with
volatile array type.
Product: clang
Version: 3.1
Platform: PC
OS/Version: All
Status: NEW
Severity: release blocker
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rahulsingh.mnnit at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
For the below test case , when the C's constructor throw , it is clearly
visible in the .bc file that there is no clean up call for B's destructor made
itself so B in all does not get cleaned up.
struct A
{
A *ptr;
static int ok;
A () {ptr = this;}
~A () {ok = ptr == this;}
};
int A::ok = -1;
struct B
{
B *ptr;
static int ok;
B () {ptr = this;}
~B () {ok = ptr == this;}
};
int B::ok = -1;
struct C
{
A volatile a;
B volatile b[1];
C ();
};
C::C ()
{
throw 1;
}
int main ()
{
try
{
C c;
}
catch (...)
{
if (A::ok != 1)
return 1;
if (B::ok != 1)
return 2;
return 0;
}
return 3;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list