#2831 new enhancement

libstdc++ silently fails in case POSIX key operations fail due to insufficient resources

Reported by: Sebastian Huber Owned by:
Priority: normal Milestone: Indefinite
Component: score Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

libstdc++ uses POSIX keys for thread-local storage in some places. It silently fails in case POSIX key operations fail due to insufficient resources. The storage space for POSIX keys is system provided via the workspace which must be configured accordingly.

To remove the need for a detailed configuration one option is this.

  1. Make the pthread_key_t self-contained, e.g. add something like this to <pthread.h>
struct _pthread_key_value_pair;

typedef struct {
  void (*_destructor)(void *);
  struct _pthread_key_value_pair *_first;
  struct _pthread_key_value_pair *_null;
  struct _pthread_key_value_pair *_last;
} pthread_key_t;
  1. Add a configurable allocator for POSIX key value pairs to the configuration.
  1. Add a simple slab based allocator to RTEMS.

Change History (1)

comment:1 Changed on Aug 13, 2017 at 11:44:44 PM by Chris Johns

Milestone: 5.0Indefinite
Version: 4.11
Note: See TracTickets for help on using tickets.