delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/23/20:42:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Sun, 23 Feb 2003 20:42:38 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Marco Giovannini <mgiova AT libero DOT it>
cc: cygwin AT cygwin DOT com
Subject: Re: SIGSEGV in localtime()?
In-Reply-To: <000501c2db7b$4a498df0$6679b550@pc350>
Message-ID: <Pine.GSO.4.44.0302232034390.16682-200000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

---559023410-456208845-1046050958=:16682
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sun, 23 Feb 2003, Marco Giovannini wrote:

> I've got this simple piece of code:
>
> time_t current_time;
> struct tm *boot_time;
> current_time = time(NULL);
> boot_time = localtime(&current_time);
>
> that is very stupid and *should* run on every posix machine, but..
> with the latest cygwin dll release (1.3.20) I receive this error:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6100d074 in cygwin_attach_handle_to_fd () from /usr/bin/cygwin1.dll
>
> Two more notes:
>   - In the cygwin dll release I had before updating the last week (I cannot
> remember which one was, but I know it was two-three months old or so),
> localtime() worked without trobles.
>   - It seems that I receive the same error also with gmtime and mktime.
>
> I cannot believe that this is an error of my stupid program...
> Does anybody have the same problem?
>
> Thank you all for your help,
> Marco Giovannini

Marco,

I was unable to reproduce your problem on Win2k SP2 (cygwin-1.3.20-1).  I
used the attached program.  It compiled fine (with "gcc -Wall") and ran
correctly, with the following output:

$ date && ./lt
Sun Feb 23 20:41:44 EST 2003
44:41:20 23/1/103 (0) [53] 0
$

The information you've provided is really not enough to even venture a
guess as to what went wrong.  Please provide at least the following:

- The output of "cygcheck -svr", as an uncompressed text attachment, as
  per <http://cygwin.com/bugs.html>
- The exact compilation command line
- The backtrace of the failed program (either from gdb, or from addr2line)
- The output of "strace yourprog" (probably compressed, it might be large)

Feel free to look over the last two for clues before sending them to the
list.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune

---559023410-456208845-1046050958=:16682
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="lt.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT GSO DOT 4 DOT 44 DOT 0302232042380 DOT 16682 AT slinky DOT cs DOT nyu DOT edu>
Content-Description: 
Content-Disposition: attachment; filename="lt.c"

I2luY2x1ZGUgPHRpbWUuaD4NCiNpbmNsdWRlIDxzdGRpby5oPg0KDQppbnQg
bWFpbihpbnQgYWMsIGNoYXIgKiphdikgew0KICB0aW1lX3QgY3VycmVudF90
aW1lOw0KICBzdHJ1Y3QgdG0gKmJvb3RfdGltZTsNCiAgY3VycmVudF90aW1l
ID0gdGltZShOVUxMKTsNCiAgYm9vdF90aW1lID0gbG9jYWx0aW1lKCZjdXJy
ZW50X3RpbWUpOw0KDQogIGZwcmludGYoc3RkZXJyLCAiJWQ6JWQ6JWQgJWQv
JWQvJWQgKCVkKSBbJWRdICVkXG4iLCBib290X3RpbWUtPnRtX3NlYywNCiAg
ICAgIGJvb3RfdGltZS0+dG1fbWluLCBib290X3RpbWUtPnRtX2hvdXIsIGJv
b3RfdGltZS0+dG1fbWRheSwNCiAgICAgIGJvb3RfdGltZS0+dG1fbW9uLCBi
b290X3RpbWUtPnRtX3llYXIsIGJvb3RfdGltZS0+dG1fd2RheSwNCiAgICAg
IGJvb3RfdGltZS0+dG1feWRheSwgYm9vdF90aW1lLT50bV9pc2RzdCk7DQoN
CiAgcmV0dXJuIDA7DQp9DQo=

---559023410-456208845-1046050958=:16682
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
---559023410-456208845-1046050958=:16682--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019