X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=Z3 UgYH6T2ypJSKi5FCpSFwtZzu+OCA0kLALBJXNe7JQQQUaqbiVKXZZLvRzn95Qtsl XzRgt8lf40EtbhLObnO9zrEXbLwxmC/xGcG//KpJPeSJm1LRfy5GR79tZaVhdWe3 dLbOG6em5FA9mMz6oOq0OcUoxPiQHrabOBb1r/7hQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=YuzLRJKY erxTH7h5XcGJyA7r8Bw=; b=hR1e0on751EiHujhZ3u9PnAe9WMCCc0SVrE5BiqT E5wTWJ+mO5ifD7PN/wm2oAabqJpWAec9raifJrOM94DoxxhtDWlaTIdn7QULLZQE 0Gnj0g8EXLS3tgvGNLUsjW/kybTnr6TE1q4EjvWKqCJakoG8xKhzHIz1WQuskj9Q PYQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f173.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=yd9CGFNhsfEmfvzND8di49gilwfnaN+U0Xh+ijK+ioc=; b=STNRaAC6WQ8lcnHRiOo+oKqjQNGyJWWd3Vp4MlDdygDxESrwk4AnDu+WhsLeQCb/kk 2nvwDTKd6YQR7bqcL86xnu5/NvTqHfVdrXJu2pV5Tc+ZGyHd0EZC/uUCdNyQnH/yumk6 uTRvgD74ABmhPGvSLBnu6GAdk8IC2Bxn0Wy54bAh+atRiqYEoqsVYlVXAg4H9zPKMqgP CJ8BGMfpPgypxLB+w1ENvw4LCMcAZgC0p7UNYS/6gWxx2FX5ECd0K4vF/RQZXlBn75SU /BoBu093Yxy+eaqZrp/zPkzkmyVTnRYhbWyxWdFk0CokUHFvwJVmOV3K0mNEX1govXZg iU0w== X-Gm-Message-State: ALoCoQmk61uv+3aFsxxdtekUFUxgY3Agkd/F9AaqkdCDc4zVAWUpS/vOiotbeCFMhFYLumog6O4V MIME-Version: 1.0 X-Received: by 10.112.219.70 with SMTP id pm6mr17264915lbc.41.1438617145155; Mon, 03 Aug 2015 08:52:25 -0700 (PDT) In-Reply-To: <20150803134223.GB18434@calimero.vinschen.de> References: <20150803083634 DOT GE17917 AT calimero DOT vinschen DOT de> <20150803134223 DOT GB18434 AT calimero DOT vinschen DOT de> Date: Mon, 3 Aug 2015 08:52:25 -0700 Message-ID: Subject: Re: Seg Fault in strftime From: Michael Enright To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes On Mon, Aug 3, 2015 at 6:42 AM, Corinna Vinschen wrote: > Hang on. So you suggest that Glibc, Cygwin, as well as any other > implementation based on the localtime.c code from Arthur David Olson, > stop using the additional struct members? Despite them doing the right > thing where the POSIX implementation is lacking? Because there's one > lib you need which doesn't work as expected, rather than rebuilding it > with a matching fix? That doesn't sound overly convincing to me. It's not just one library that I use that has tripped over this. My brief research into workarounds led me to the glibc guys shrugging off another project's report. I bet there has been plenty of time spent on this on the application side that has not left a trail for me to find. > > Other than that, you didn't answer the question: How is a library > supposed to know that the non-NULL pointer value is just garbage? I think that is the wrong question. The problem is when there is nothing telling anyone anything until something crashes. There is nothing in the official documentation of the API to inform a user that they must prepare the struct any particular way. There are two ways the library would not find itself crashing from structs it didn't like: Not use undocumented members that are pointers that can be garbage, **OR** tell everyone how to initialize the structs, through the POSIX spec or through man pages. > > I'm firmly with the GLibc guys here... > As far as I can tell the Glibc guys did not solve anyone's problem. I'm interested in a solution at the libmozjs level and I'm interested in getting struct tm in line with its documentation one way or the other. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple