Bug 8790 - Use of non thread-safe strtok in src/localename.cc
Summary: Use of non thread-safe strtok in src/localename.cc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-02 16:06 UTC by pcarlini
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pcarlini 2002-12-02 16:06:00 UTC
locale::_Impl::_Impl was recently modified in the context
of the Posix names work (see 2002-10-16 commits). However, unfortunately, strtok is *not* thread-safe.
This is a regression wrt the much limited but thread-safe
implementation present in 3.2.

Release:
gcc-3.2.1

Environment:
Any
Comment 1 pcarlini 2002-12-02 16:06:00 UTC
Fix:
Already fixed in mainline. See 2002-11-25 and 2002-11-28
commits.
Comment 2 Paolo Carlini 2002-12-02 16:11:23 UTC
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-Why: Analyzed.
Comment 3 Paolo Carlini 2002-12-02 16:11:23 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.
Comment 4 Paolo Carlini 2002-12-05 05:10:31 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed with:
    2002-12-05  Paolo Carlini  <pcarlini@unitus.it>
                Nathan Myers  <ncm@cantrip.org>
    	
    	PR libstdc++/8790
    	* src/localename.cc
    	(locale::_Impl::_Impl(const char*, size_t)):
    	Avoid strtok for thread safety.
Comment 5 Paolo Carlini 2002-12-05 13:04:44 UTC
From: paolo@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/8790
Date: 5 Dec 2002 13:04:44 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	paolo@gcc.gnu.org	2002-12-05 05:04:44
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/src: localename.cc 
 
 Log message:
 	2002-12-05  Paolo Carlini  <pcarlini@unitus.it>
 	Nathan Myers  <ncm@cantrip.org>
 	
 	PR libstdc++/8790
 	* src/localename.cc
 	(locale::_Impl::_Impl(const char*, size_t)):
 	Avoid strtok for thread safety.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1057.2.159.2.63&r2=1.1057.2.159.2.64
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/localename.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.24.2.3.4.2&r2=1.24.2.3.4.3