Project

General

Profile

Bug #980

pthread_create() cause crash if destroyed pthread_attr_t passed

Added by Dmitry Moskalchuk over 5 years ago. Updated over 4 years ago.

Status:
Open
Priority:
Normal
Category:
libcrystax
Target version:
Start date:
06/21/2015
Due date:
% Done:

0%

Estimated time:
CPU Architecture:
Host OS:
Toolchain:
Android version:
CrystaX Version:

Description

pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_destroy(&attr);
pthread_create(&tid, &attr, func, NULL); /* <= This line cause crash */

This is wrong behavior; pthread_create() should return EINVAL rather than crash.

Also available in: Atom PDF