Segfault in fprintf in thread with minimal stack size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
A thread started with a minimal stack size (PTHREAD_STACK_MIN from limits.h), can't even call fprintf(stderr, "%s", "") without segfaulting. Took me a good while to debug this one in our embedded software.
This program will segfault:
#include <pthread.h>
#include <stdio.h>
#include <limits.h>
static void* thread_
{
fprintf(stderr, "Hello, %s!", "World");
return 0;
}
int main()
{
pthread_attr_t attr;
pthread_t thread;
pthread_
pthread_
pthread_
pthread_
return 0;
}
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libc6-dev 2.15-0ubuntu10.4
ProcVersionSign
Uname: Linux 3.2.0-53-generic i686
ApportVersion: 2.0.1-0ubuntu17.4
Architecture: i386
Date: Thu Sep 26 08:09:33 2013
InstallationMedia: Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release i386 (20130820.2)
MarkForUpload: True
ProcEnviron:
LANGUAGE=en_US:en
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: eglibc
UpgradeStatus: No upgrade log present (probably fresh install)