Re: gcc exception handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



王 刚伟 wrote:
> Hi,
>
> Here is My test function :
>
> class A
> {
> public:
> private:
> char string[SIZE];
> };
>
> void test1(void)
> {
> A obj;
>
> try {
> throw obj; }
> catch (A &e)
> {
> printf("exception ! \n");
> }
> }
>
> when SIZE <= 68,"__cxa_allocate_exception" allocates space for the
> exception successfully,after "__cxa_throw" is
> called,"__cxa_begin_catch" is called,and the statement "printf..." in
> the catch block can be executed.
> when SIZE > 68, ,"__cxa_allocate_exception" also allocates space for
> the exception successfully,but after "__cxz_throw" is
> called,"__cxa_end_catch" is called,and the program crashed.
>
> Did the error occur in compilation period or link period?
> How can I make the compiler support SIZE <= the size of Task Space?
>
> Any suggestions?
>
Which compiler are you using? If it's g++, you would look at (and show
us) the result of g++ -v. If it's icpc, you would use analogous options
(e.g. icpc -#) and discuss on
http://softwareforums.intel.com/ISN/Community/en-US/forums/1016/ShowForum.aspx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux