Bug 259 - Exceptions cannot pass through uClibc functions
Summary: Exceptions cannot pass through uClibc functions
Status: NEW
Alias: None
Product: uClibc
Classification: Unclassified
Component: Other (show other bugs)
Version: 0.9.30.1
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 06:16 UTC by Michael Deutschmann
Modified: 2015-12-02 19:38 UTC (History)
1 user (show)

See Also:
Host: i386-pc-linux-uclibc
Target:
Build:


Attachments
Test program (338 bytes, text/plain)
2009-03-31 06:16 UTC, Michael Deutschmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Deutschmann 2009-03-31 06:16:55 UTC
Created attachment 221 [details]
Test program

The attached test program works (exits with 0 returncode) on glibc, but aborts on uClibc.

The problem is that the bsort module of uClibc is not compiled with "-fexceptions", thus stack unwinding through it fails.

Compiling every relevant module with "-fexceptions" would bloat uClibc somewhat, especially on a threaded build where the many "cancellation point" functions would require this treatment.

However, uClibc's headers, like glibc's, make sure not to declare __attribute ((nothrow)) on the relevant functions, which suggests that pass-through is supposed to work.
Comment 1 Mike Frysinger 2009-07-22 06:56:10 UTC
there's no point in going half way.  either all of the relevant files get compiled with -fexception support, or none of them do.

looking at glibc shows that most of the I/O funcs use it, as well as a smattering of random functions.  the question is, what determines whether a function needs exception support.  i'm not familiar enough with C++ or the related documentation to figure that out ... POSIX doesnt cover this at all from what i can see.