[LLVMbugs] [Bug 12107] New: __builtin_longjmp code not generated for Arm.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 28 01:49:58 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12107
Bug #: 12107
Summary: __builtin_longjmp code not generated for Arm.
Product: clang
Version: 3.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: release blocker
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nikhil.girdhar at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I have a simple test program to test the functionality of builtin
setjmp/longjmp.
#include "setjmp.h"
int buf[12];
void foo_l(){
__builtin_longjmp(buf,1);
}
int foo_s(int x){
int prev =0;
__builtin_setjmp(buf);
if(prev == 0)
while(1)
{
prev = 1;
foo_l(); //Point A
}
if(prev == 0)
return 0;
else
return x;
}
int main(void)
{
if(foo_s(1) == 0)
abort();
return 0;
}
This program when compiled with clang for march=armv7-a generates a
segmentation fault. On execution of foo_l() at Point A code flow is transferred
to the beginning of the foo_s.
On further investigating the assembly code I found that the code for
__builtin_longjmp is not generated i.e. foo_l is an empty label in the .s file.
On the other hand the program executes correctly if library calls for
setjmp/longjmp are used instead of the builtins.
Please give some pointers.
Regards,
Nikhil.
--
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