Date: Mon, 21 Feb 2000 11:29:31 +0100 (CET) From: cracauer@cons.org To: FreeBSD-gnats-submit@freebsd.org Subject: bin/16862: strptime "%+" broken in 4.0-current Message-ID: <200002211029.LAA01431@knight.cons.org>
next in thread | raw e-mail | index | archive | help
>Number: 16862 >Category: bin >Synopsis: strptime(..., "%+" ...) dumps core >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 21 02:30:01 PST 2000 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002211029.LAA01431>