- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
{
throw std::exception("unknown");
}
Code such as above is causing a segmentation violation in part of my code ( both opt and debug code, 100% reproducible) inside the gcc exception handling runtime ( looks like when unwinding the stack).
No problems on Windows compiled version of same code or if I do not rethrow.
Anyone else?? Known issue.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The gcc version is as follows...
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
Sorry about the sample code, the code that actually causes a segmentation violation in the gcc runtime is
catch(...)
{
throw;
}
I was experimenting in my code with (re) throwing another exception ( same problem though)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 183067478624 (LWP 24854)]
0x0000003d3f20885c in _Unwind_RaiseException () from /lib64/libgcc_s.so.1
The stack is
#0 0x0000003d3f20885c in _Unwind_RaiseException () from /lib64/libgcc_s.so.1
#1 0x0000003d3f4af296 in __cxa_throw () from /usr/lib64/libstdc++.so.6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[u80498]$ cat test.cpp
#include
int foo(int x, int y)
{
int result;
try {
result = x/y;
}
catch(...)
{
throw;// std::exception("unknown");
}
}
int main() {
foo(10, 3);
return(0);
}
[u80498]$ icc -V -g test.cpp
Intel C Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100806 Package ID: l_cproc_p_11.1.073
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Edison Design Group C/C++ Front End, version 3.10.1 (Aug 6 2010 19:14:21)
Copyright 1988-2007 Edison Design Group, Inc.
test.cpp(13): warning #1011: missing return statement at end of non-void function "foo"
}
^
GNU ld version 2.15.92.0.2 20040927
[u80498]$ ./a.out
Is it possible for you to send us a reproducible test case? It will be easier to understand if it's an environmental dependency or a coding one that's causing the problem. If IP is a concern, you can submit it as a private post or via our Premier Support web site at http://premier.intel.com

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page