Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165558 - dev-libs/xxl-1.0.1 - error in nested try blocks
Summary: dev-libs/xxl-1.0.1 - error in nested try blocks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo TreeCleaner Project
URL:
Whiteboard: Vote
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 03:13 UTC by Grigory Dorokhov
Modified: 2008-01-17 19:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
it helps (xxl-1.0.1_nested.patch,486 bytes, patch)
2007-02-06 03:14 UTC, Grigory Dorokhov
Details | Diff
it helps in case of more than two nested try blocks (xxl-1.0.1_nested_1.patch,496 bytes, patch)
2007-02-09 10:38 UTC, Grigory Dorokhov
Details | Diff
test for case of more than two nested try blocks (xxltest.c,7.90 KB, text/plain)
2007-02-09 10:39 UTC, Grigory Dorokhov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grigory Dorokhov 2007-02-06 03:13:12 UTC
xxl does not allow catch an inner thrown exception in outer catch blocks
it prints "XXL: Exception thrown with no handler to catch it!"


Reproducible: Always

Steps to Reproduce:
1. extract xxl-1.0.1.tar.gz
2. configure && make check


Actual Results:  
you'll see 
Testing simple exception catching ...
Testing simple finally block execution ...
Testing simple asset management ...
Testing nested exception handling ...
XXL: Exception thrown with no handler to catch it!
/bin/sh: line 4: 19108 Aborted                 ${dir}$tst
FAIL: xxltest
=============================
1 of 1 tests failed
Please report to xxl@zork.org
=============================


Expected Results:  
Testing simple exception catching ...
Testing simple finally block execution ...
Testing simple asset management ...
Testing nested exception handling ...
PASS: xxltest
==================
All 1 tests passed
==================


possible patch:

diff -c xxl-1.0.1/xxl.c xxl-1.0.1.patched/xxl.c 
*** xxl-1.0.1/xxl.c     2004-12-22 19:42:52.000000000 +1000 
--- xxl-1.0.1.patched/xxl.c     2007-02-05 22:26:52.000000000 +1000 
*************** 
*** 380,385 **** 
--- 380,386 ---- 
              if (!tsd->contexts) 
                  die("XXL: Exception thrown with no handler to catch it!\n"); 
              tsd->contexts->exception = *exception; 
+             how=XXL_SETJMP_TRY; 
              xxl_leave_handler(how); 
              return; 
      }
Comment 1 Grigory Dorokhov 2007-02-06 03:14:32 UTC
Created attachment 109297 [details, diff]
it helps
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-02-06 07:32:51 UTC
Kindly review http://bugs.gentoo.org/page.cgi?id=fields.html#bug_severity
Comment 3 Grigory Dorokhov 2007-02-09 10:38:49 UTC
Created attachment 109608 [details, diff]
it helps in case of more than two nested try blocks
Comment 4 Grigory Dorokhov 2007-02-09 10:39:48 UTC
Created attachment 109610 [details]
test for case of more than two nested try blocks
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-11-18 00:14:09 UTC
Commited by vapier who apparently can't be bothered to fix bugs on stuff he did dump into the tree... Treecleaners please remove this. Only used by dev-libs/safestr which isn't used by anything.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2008-01-17 19:33:23 UTC
Fixed, thanks.