Bill Allombert on Sat, 17 May 2003 12:23:29 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [Cygwin] MPQS broken |
On Thu, May 15, 2003 at 04:53:38PM +0200, Karim BELABAS wrote: > Hi, > > I have just received a bug report that MPQS is completely broken under > Cygwin, at least compiled with gcc-3.2 (that's my XP binary, as available > in parigp-home.de's download area :-(). I can reproduce it on our Windows > box (XP), and of course nowhere else. > > Any invocation of mpqs(), e.g as in > > factor(2^(2^7) + 1) > > causes a SEGV in mpqs.c:mpqs_mergesort_lp_file0(), more precisely in the first > fgets() [ line 400 ], within memcpy() in cygwin1.dll. > > This only occurs with -fomit-frame-pointer, at -O2 or higher so it doesn't > look like cygwin1.dll is to blame. It's independant of GCC_INLINE and works > flawlessly at -O1, or without -fomit-frame-pointer. > > I have absolutely no clue as to what could cause the bug. Just in case, > I have extended the size of some static arrays, e.g > > line[MPQS_STRING_LENGTH] --> line[MPQS_STRING_LENGTH + 1024] > > to no avail. At least the bug doesn't go away when I add printf calls > around. > > Any idea ??? Try to upgrade gcc-3.2 to 3.2.3, it fix several optimiser bugs. Alternatively drop '-fomit-frame-pointer' on Windows, this is always a troublesome optimization. Cheers, Bill.