From: xunxun <xunxun1982@gmail.com>
To: jojelino <jojelino@gmail.com>
Cc: gcc@gcc.gnu.org, Kai Tietz <ktietz70@googlemail.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
Date: Sat, 22 Oct 2011 13:13:04 +0800 [thread overview]
Message-ID: <4EA250E0.3080808@gmail.com> (raw)
In-Reply-To: <j7sgfi$i66$1@dough.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
Hi, all
It seems that gcc's auto-omit-frame-pointer has other problems.
The example is from mingw bug tracker:
http://sourceforge.net/tracker/?func=detail&aid=3426555&group_id=2435&atid=102435
g++ -O3 main.cpp running will crash.
g++ -O2 main.cpp running no crash.
g++ -O3 -fno-omit-frame-pointer running no crash.
I don't know in the end which optimize option defaultly contains
this switch "-fomit-frame-pointer" on i686-pc-mingw32 or x86_64-w64-mingw32?
--
Best Regards,
xunxun
[-- Attachment #2: main.cpp --]
[-- Type: text/plain, Size: 750 bytes --]
#include <vector>
typedef void (*Func)(char*);
bool lie = false;
Func dummy = 0;
void moveToWindowsRecycler(const std::vector<int>& filesToDelete = std::vector<int>()) //throw FileError
{
if (!lie)
throw 1;
char errorMessage[20000];
Func fun = lie ? dummy : 0;
fun(errorMessage);
std::vector<int> fileNames;
for (std::vector<int>::const_iterator iter = filesToDelete.begin(); iter != filesToDelete.end(); ++iter)
fileNames.push_back(*iter);
}
void wgfdfsdgfsdgfsdg() //throw FileError
{
::moveToWindowsRecycler(); //throw FileError
}
int main()
{
try
{
moveToWindowsRecycler() ;//throw FileError
}
catch (...) {}
return 0;
}
next prev parent reply other threads:[~2011-10-22 5:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 4:39 [Qemu-devel] qemu-system-sparc io-thread segfault on win32 Bob Breuer
[not found] ` <4E9C0497.2000605@siriusit.co.uk>
2011-10-17 14:09 ` Bob Breuer
2011-10-17 17:22 ` [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp Richard Henderson
2011-10-17 19:14 ` Blue Swirl
2011-10-17 20:11 ` Richard Henderson
2011-10-17 21:20 ` Bob Breuer
2011-10-17 21:31 ` Kai Tietz
2011-10-17 22:23 ` Bob Breuer
2011-10-17 22:56 ` Kai Tietz
2011-10-19 21:05 ` Bob Breuer
2011-10-19 22:19 ` Richard Henderson
2011-10-20 4:22 ` xunxun
2011-10-20 14:48 ` Kai Tietz
2011-10-20 15:34 ` Kai Tietz
[not found] ` <j7sgfi$i66$1@dough.gmane.org>
2011-10-22 5:13 ` xunxun [this message]
2011-10-22 5:21 ` xunxun
2011-10-22 11:19 ` Kai Tietz
2011-10-22 14:23 ` asmwarrior
2011-10-24 14:45 ` Bob Breuer
2011-10-24 16:18 ` Kai Tietz
2011-10-25 15:14 ` Bob Breuer
2011-10-20 13:04 ` jojelino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EA250E0.3080808@gmail.com \
--to=xunxun1982@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=jojelino@gmail.com \
--cc=ktietz70@googlemail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.