lsb

Known bug concerning visibility in stdexcept

Bug #1327312 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

As in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 already broadly
discussed, the `stdexcept' header in the LSB SDK 4.1 is still not properly
enclosed inside pragma visibility push/pop directives.

Example:

#include <exception>
#include <stdexcept>
#include <string>

void test() {
    try {
        std::string().substr(10);
    } catch(const std::out_of_range &) {
        // Might slip through this with -fvisibility=hidden
    } catch(const std::exception &) {
        // This catches always
    }
}

The resulting behavior of this function depends strongly on the used
libstdc++.so. If the typeinfos are still compared using only their addresses
and not their actual content the catch-clause with std::out_of_range won't
catch. In contrast to that, the last catch-clause with std::exception will
catch since the header `exception' does declare std::exception with default
visibility.

Regarding such problems in the libraries supplied by the LSB SDK, what is the
usual policy? Is it possible to merge fixes provided in later versions of the
original libraries?
[reply] [-] Comment 1

Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: c++ zpunt
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.