Bug 62098
Summary: | printf() + clone(CLONE_VM | CLONE_FILES) = race condition | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Johan Walles <johan.walles> | ||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.1 | CC: | fweimer | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-03-27 15:07:04 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Johan Walles
2002-03-27 14:53:57 UTC
Created attachment 50864 [details]
40 line C program illustrating the problem
This is not a glibc bug. If you are using clone directly (as opposed to using pthread_create), you're responsible for locking too. printf (well, not only that) is thread safe because it uses pthread_mutex* etc. If you don't want to use -lpthread, you either need to write a threading library of your own which will at least provide the locking semantics glibc need, or use some locking around all calls you make into foreign libraries which need thread safety. |