Charles Wilson | 1 Jan 01:45 2003
Picon

Re: Heads up: *possible* bug in cygwin

Christopher Faylor wrote:
> On Tue, Dec 31, 2002 at 09:43:50AM -0500, Charles Wilson wrote:
> 
>>Did gcc (pre 3.2) automatically initialize data to 0, while gcc-3.2 does 
>>not?  Hmmm...waitaminute, I do have gcc2 installed...
> 
> 
> If gcc/ld is not initializing static data to zero then there are some
> pretty serious problems.  Neither gcc, nor any other compiler that I
> am aware of, is supposed to initialize automatic data to zero.

You're right, as usual.  (Plus empirical evidence: no change when 
compiling with gcc-2.  Still get the SIGSEGV)

You're also right [I think] about the buffer overrun/whatever problem in 
glib.  I haven't found the specific, offending command yet, but it seems 
pretty obvious from the postmortem that that is what has happened.

Single-stepping thru the code shows some interesting things.  Basically, 
we have a g_string (structure that contains a char* field, a length 
field, plus some other fields that are hidden from the public interface. 
  The whole structure is dynamically allocated, and the char* field 
points to additional dynamically allocation storage.

This g_string is initially allocated as a minimum size string, where the 
char* points to a minimum size buffer (4 bytes, it appears), but 
contains "" (e.g. *char = '\0', len = 0).  [as far as glib is concerned, 
the char* points to a chunk of memory 4 bytes long.  But dlmalloc 
actually uses a chunk that is 16 bytes long == 3 32bit words of dlmalloc 
overhead, plus the user data]
(Continue reading)

Robert Collins | 1 Jan 02:05 2003

Re: Heads up: *possible* bug in cygwin

On Wed, 2003-01-01 at 11:45, Charles Wilson wrote:

> [...but I can't reproduce the fault on linux.  Even if I link in 
> dlmalloc.  Bleah.  ElectricFence on linux couldn't find anything 
> suspicious either.]

You might try valgrind. valgrind is *good*.

Happy New Year.
Rob
--

-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---
Wes Szumera | 1 Jan 03:41 2003
Picon

convert utility

Is there a convert utility for graphics conversion in cygwin?  I tried 
looking on website and came up empty.

Thanks,

Wes

Robert McNulty Junior | 1 Jan 04:04 2003
Picon

RE: convert utility

try http://www.google.com
It's a search engine.

-----Original Message-----
From: cygwin-owner <at> cygwin.com [mailto:cygwin-owner <at> cygwin.com]On Behalf
Of Wes Szumera
Sent: Tuesday, December 31, 2002 8:42 PM
To: cygwin <at> cygwin.com
Subject: convert utility

Is there a convert utility for graphics conversion in cygwin?  I tried
looking on website and came up empty.

Thanks,

Wes

--
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/

Wes Szumera | 1 Jan 04:43 2003
Picon

RE: convert utility

Robert,

Yes, I know what google is.  Between www.google.com and 
groups.google.com, I tend to find most of what I want to get a line 
on.  

What caused me a problem in searching, is that convert is a rather 
common word. From what I was told by an acquainance on a non 
computer list, imagine that, since my initial post is this is part of 
imagemagick.  Currently downloading it so my question should be 
resolved assuming I can get it to compile ;)

Happy New Year to all,

Wes

From:           	"Robert McNulty Junior" 
<bmj2001 <at> bellsouth.net>
To:             	"Wes Szumera" 
<wszumera <at> chartermi.net>,
	<cygwin <at> cygwin.com>
Subject:        	RE: convert utility
Date sent:      	Tue, 31 Dec 2002 21:04:02 -0600

> try http://www.google.com
> It's a search engine.
> 
> -----Original Message-----
> From: cygwin-owner <at> cygwin.com [mailto:cygwin-owner <at> cygwin.com]On Behalf
> Of Wes Szumera
(Continue reading)

Shing-Fat Fred Ma | 1 Jan 05:22 2003
Picon
Picon

gnu tar opens tgz's with file times in the future

Hello,

I'm gnu-tarring files with tar version 1.13.25
on solaris, then untarring with the same version
on cygwin.  The files are dated 2002-12-31 18:09:xx
in the tgz on solaris.  When I sftp them to cygwin,
the tar programs shows the files to be dated
2003-01-01 03:09.xx.  But typing "date" at the
cygwin prompt shows the computer clock to be right
i.e. Tue Dec. 31 2002.

Cygcheck gives:

> cygutils            1.1.3-1
> cygwin              1.3.17-1

I'm using Win2K with SP3.

Thanks for any pointers.

--

-- 
Fred Ma, fma <at> doe.carleton.ca
Carleton University, Dept. of Electronics
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6

Shing-Fat Fred Ma | 1 Jan 05:26 2003
Picon
Picon

SOLVED: gnu tar opens tgz's with file times in the future

Shing-Fat Fred Ma wrote:

> Hello,
>
> I'm gnu-tarring files with tar version 1.13.25
> on solaris, then untarring with the same version
> on cygwin.  The files are dated 2002-12-31 18:09:xx
> in the tgz on solaris.  When I sftp them to cygwin,
> the tar programs shows the files to be dated
> 2003-01-01 03:09.xx.  But typing "date" at the
> cygwin prompt shows the computer clock to be right
> i.e. Tue Dec. 31 2002.

It was the time zone not set right on the PC.
Didn't know gnu tar was made to compensate
for time zones......

Fred

--

-- 
Fred Ma, fma <at> doe.carleton.ca
Carleton University, Dept. of Electronics
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6

Gareth Pearce | 1 Jan 10:28 2003
Picon

valgrind

Hi,

Has anyone atempted to port valgrind to cygwin?
I thought it was something that would be good to do, but its looking like
quite a big job, given that its tied so strongly to the linux kernel.  I
could keep ripping it to bits until it compiles - but I am guessing the end
product will be useless.
Is it feasible at all given cygwin not actually being an OS? -- would i
really effectively need to port it to native windows?

Gareth

Steven O'Brien | 1 Jan 11:05 2003

Re: Heads up: *possible* bug in cygwin

Hi
I found a possible glib buffer overflow that is cygwin-specific (due to
a bug in cygwin perhaps?) that I worked around when porting glib-1.2.10
to cygwin. Maybe this is still a problem in glib-2.0.x

In glib-1.2.10, gutils.c: g_get_any_init (void), the current user
details are obtained from /etc/passwd. This code is called as part of
glib initialisation, whether the app wants this data or not. It uses
sysconf (_SC_GETPW_R_SIZE_MAX) to decide how much buffer to allocate for
this data. But on cygwin this appears broken, and the call to getpwuid_r
(getuid (), &pwd, buffer, bufsize, &pw) *may* overrun buffer, depending
on the length of the line in /etc/passwd for the current user. So maybe,
Chuck, since May when you last saw this test pass, your /etc/passwd
entry has got longer?

From (hazy) memory, the buffer is 64 bytes, so if your /etc/passwd entry
has more than 64 chars (quite possible if you are using ntsec) then
memory gets trashed.

My patch works around this problem by allocating a buffer of 1024 bytes
for cygwin. I think I got this value by reading the cygwin dll source to
find a real upper bound, but it was a long time ago so this needs
checking. 

Of course a real fix is required to sysconf() /  getpwuid_r() in cygwin,
but to test this theory you could borrow the fix from my glib patch and
try it on glib 2.0.x

Regards,
Steven
(Continue reading)

Robert Collins | 1 Jan 11:38 2003

Re: pthread support ... broken in the past .. fixed now?

On Tue, 2002-12-31 at 04:11, H. Henning Schmidt wrote:
> I am porting the omniORB CORBA-framework to cygwin.
> It makes heavy use of pthreads, I do not see a way to work around that 
> ... so I need pthreads working in cygwin.
> I have found a number of messages in the the mailing-list archives 
> referring to some major problems with pthreads under cygwin.
> These messages mostly are from over a year ago, so I am wondering
> -> if those apparent problems (with pthreads under cygwin) been fixed in 
> the meantime?
> -> are there any remaining known issues with pthreads / cygwin?

Please be specific. I.e. "CORBA requires XYZ that is referenced as
broken in ABC".

Rob

--

-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---

Gmane