Bug 544022 - strftime used in logsys.c is not thread safe
Summary: strftime used in logsys.c is not thread safe
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: corosync
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Friesse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-03 17:56 UTC by Steven Dake
Modified: 2016-04-26 18:09 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-12-08 14:37:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch removing strftime with ISO time format output (1.43 KB, patch)
2009-12-04 11:06 UTC, Jan Friesse
no flags Details | Diff
Mostly same patch, but output is similar to current output (1.49 KB, patch)
2009-12-04 11:07 UTC, Jan Friesse
no flags Details | Diff

Description Steven Dake 2009-12-03 17:56:21 UTC
Description of problem:
Posix requires strftime to be thread safe according to the specification.  Unfortunately the implementation of strftime in libc uses getenv, which according to Posix spec is not thread safe.  Please rework the usage of strftime to some other API which does not use getenv.

Version-Release number of selected component (if applicable):
corosync-1.1.2

How reproducible:


Steps to Reproduce:
1. may only occur on debian 
2. turn on timestamps
3. run code
  
Actual results:
http://marc.info/?l=openais&m=125785302203928&w=2

Expected results:
no segfualt

Additional info:

Comment 1 Jan Friesse 2009-12-04 11:06:19 UTC
Created attachment 376057 [details]
Patch removing strftime with ISO time format output

Comment 2 Jan Friesse 2009-12-04 11:07:00 UTC
Created attachment 376058 [details]
Mostly same patch, but output is similar to current output

Comment 3 Jan Friesse 2009-12-08 14:37:30 UTC
Second patch is now included in upstream. I hope it solves problem and closing bug


Note You need to log in before you can comment on or make changes to this bug.