| Karim BELABAS on Thu, 15 May 2003 16:53:38 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [Cygwin] MPQS broken |
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 ???
Karim.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425 Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France) http://www.parigp-home.de/ [PARI/GP]