From cracauer@knight.cons.org  Mon Feb 21 02:29:38 2000
Return-Path: <cracauer@knight.cons.org>
Received: from knight.cons.org (knight.cons.org [194.233.237.195])
	by hub.freebsd.org (Postfix) with ESMTP id CBFBD37BD61
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Feb 2000 02:29:36 -0800 (PST)
	(envelope-from cracauer@knight.cons.org)
Received: (from cracauer@localhost)
	by knight.cons.org (8.9.3/8.9.3) id LAA01431;
	Mon, 21 Feb 2000 11:29:31 +0100 (CET)
Message-Id: <200002211029.LAA01431@knight.cons.org>
Date: Mon, 21 Feb 2000 11:29:31 +0100 (CET)
From: cracauer@cons.org
Sender: cracauer@knight.cons.org
Reply-To: cracauer@cons.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: strptime "%+" broken in 4.0-current
X-Send-Pr-Version: 3.2

>Number:         16862
>Category:       bin
>Synopsis:       strptime(..., "%+" ...) dumps core
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    cracauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 02:30:01 PST 2000
>Closed-Date:    Wed Aug 16 12:33:16 MEST 2000
>Last-Modified:  Wed Aug 16 12:33:51 MEST 2000
>Originator:     Martin Cracauer
>Release:        FreeBSD-4.0-current from Feb, 17th, 2000
>Organization:
BSD User Group Hamburg
>Environment:

FreeBSD-4.0-current from Feb, 17th, 2000

>Description:

Parsing '%+' (time in date(1) format) in strptime dumps core. it works
in 3.4-stable. 

>How-To-Repeat:

Run this standalone program:


#include <stdio.h>
#include <time.h>

int
main(void)
{
  struct tm tm;
  if (strptime("Mon Feb 21 11:20:36 MET 2000", "%+", &tm) == NULL) {
    printf("Parsing failed\n");
    exit(1);
  }

  printf("Time was '%s'\n", asctime(&tm));

  return 0;
}

Result:

#0  0x280c19ee in strcmp () from /usr/lib/libc.so.4
#1  0x2807f0a8 in i386_get_ioperm () from /usr/lib/libc.so.4
#2  0x2807e2e9 in i386_get_ioperm () from /usr/lib/libc.so.4
#3  0x2807f13d in strptime () from /usr/lib/libc.so.4
#4  0x80484b0 in main () at ptime.c:8
#5  0x804842d in _start ()

>Fix:

I'm not sure why this program messes with i386_get_ioperm etc. at all,
so I didn't take a shot at it.
	
Someone who messed with strptime in -current should pick it up.
Thanks.

>Release-Note:
>Audit-Trail:

From: Martin Cracauer <cracauer@cons.org>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: bin/16862: strptime "%+" broken in 4.0-current
Date: Tue, 22 Feb 2000 10:16:48 +0100

 This looks like a dynamic linker bug, see my message to the -current
 list from earlier today.
 
 Martin
 -- 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
 BSD User Group Hamburg, Germany     http://www.bsdhh.org/
 

From: Alfred Perlstein <bright@wintelcom.net>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc: Martin Cracauer <cracauer@cons.org>
Subject: Re: bin/16862: strptime "%+" broken in 4.0-current
Date: Wed, 23 Feb 2000 12:11:09 -0800

 This looks like it's been addressed:
 
 3-stable:
 ~ % ./a.out 
 Parsing failed
 
 4-stable:
 ~ % ./a.out 
 Parsing failed
 
 You didn't specify the desired output, is that what you wanted?
 If so may I close the pr?  If not can you explain what output
 should be presented?
 
 thanks,
 -- 
 -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
 
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Wed Mar 29 01:36:20 PST 2000 
State-Changed-Why:  
What's the story, morning glory? 
:-) 
State-Changed-From-To: feedback->open 
State-Changed-By: sheldonh 
State-Changed-When: Wed Mar 29 03:35:19 PST 2000 
State-Changed-Why:  
Martin says he'd like this one open until the compiler/linker 
problem is fixed. 


Responsible-Changed-From-To: freebsd-bugs->cracauer 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Wed Mar 29 03:35:19 PST 2000 
Responsible-Changed-Why:  
Martin wants this one. :-) 
State-Changed-From-To: open->closed 
State-Changed-By: cracauer 
State-Changed-When: Wed Aug 16 12:33:16 MEST 2000 
State-Changed-Why:  
Fixed by binutils update in both -current and -stable 

http://www.freebsd.org/cgi/query-pr.cgi?pr=16862 
>Unformatted:
