Greetings, I have an unusual problem, and i need a simple answer if it's gcc or if it's the cygwin1.dll in malloc(). GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special) gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) First off, semrand is a public static variable. There was a key generated for this (for use as random numbers) The problem wasn't around before, but only in this minor revision when i added a lot of errno support, yet then later i tried taking it all out and with no further success. (unless resetting errno might have some other side effects?) I have not yet confirmed this with a linux system, but will very shortly. Here's the output after i got it going. -- 62 errno = 0; (gdb) print *semrand $25 = {keys = 1, crypt = 1, block = 0, block_size = 0, quick_offset = 1, mem_size = 8244, ver = {VER = 0, MAJOR = 2, MINOR = 2, REV = 0}} (gdb) n 63 buffer = malloc (mem_size); (gdb) print *semrand $26 = {keys = 1, crypt = 1, block = 0, block_size = 0, quick_offset = 1, mem_size = 8244, ver = {VER = 0, MAJOR = 2, MINOR = 2, REV = 0}} (gdb) n 70 blockseek_mem = buffer; (gdb) print *semrand $27 = {keys = 1, crypt = 1, block = 0, block_size = 0, quick_offset = 1, mem_size = 2436, ver = {VER = 0, MAJOR = 2, MINOR = 2, REV = 0}} (gdb) print buffer $28 = (int *) 0x6729f8 (gdb) print mem_size $29 = 4096 (gdb) print &mem_size $30 = (int *) 0x226608 (gdb) print buffer $31 = (int *) 0x6729f8 (gdb) print &semrand $32 = (Sembeg **) 0x409050 (gdb) print semrand $33 = (Sembeg *) 0x674378 (gdb) back #0 semkey_gen (key=0x6783e8, name=0x4087c8 "semkey_srand", key_type=12, text_input=0x0, make_key_size=4096) at keygen.c:70 #1 0x00405b1f in semkey_rand_init (seed=0x2266d0, size=-1) at rand.c:245 #2 0x004055f1 in semkey_rand (seed=3) at rand.c:128 #3 0x00405cbe in semkey_srand (seed=3) at rand.c:287 #4 0x0040674c in main (argc=4, argv=0x6719e0) at simple.c:72 (gdb) Note the 'mem_size = 2436' changed after malloc was called, and later in my key it's messed up as well, which kills my program. Is there something about the address 0x409050? I thank you for any help you can give. Era __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com