[llvm-bugs] [Bug 50142] New: `__builtin_setjmp` saves frame pointer incorrectly for x86_64-w64-windows-gnu (MinGW) target
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 27 06:04:43 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50142
Bug ID: 50142
Summary: `__builtin_setjmp` saves frame pointer incorrectly for
x86_64-w64-windows-gnu (MinGW) target
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: xtkoba at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 24805
--> https://bugs.llvm.org/attachment.cgi?id=24805&action=edit
Repro
The attached file contains a reproducing code and its objdump.
When cross-compiled for x86_64-w64-windows-gnu (MinGW) on my x86_64 GNU/Linux
environment, `__builtin_setjmp` saves the frame pointer which is 0x80 lower
than expected, and so the local variables are messed up after returning with
`__builtin_longjmp`.
A workaround is to add 0x80 to the first element of the jump buffer immediately
after `__builtin_setjmp` returns 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210427/6b5fd220/attachment.html>
More information about the llvm-bugs
mailing list