Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!silver!ferneau From: ferneau@silver.UUCP Newsgroups: comp.unix.wizards Subject: Ultrix-2.0 calloc bug? Message-ID: <12300001@silver> Date: Fri, 2-Oct-87 05:23:00 EDT Article-I.D.: silver.12300001 Posted: Fri Oct 2 05:23:00 1987 Date-Received: Sat, 3-Oct-87 10:11:52 EDT Organization: Indiana University BACS, Bloomington Lines: 97 Nf-ID: #N:silver:12300001:000:1967 Nf-From: silver.bacs.indiana.edu!ferneau Oct 2 04:23:00 1987 /* Written 4:19 am Oct 2, 1987 by ferneau@silver.UUCP in silver:cs.unix.bacs */ /* ---------- "Ultrix-2.0 calloc bug?" ---------- */ I am having a problem with dynamic memory allocation on silver (a VAX 8650 running Ultrix 2.0) using the calloc() routine, which seems to be corrupting my array. Here is the program I am using: /* * tmp.c * * copy a given argument list into dynamic memory * */ #include #include #define ERR stderr char **replicate(); char *Me; main(argC,argV) int argC; char **argV; { int argc; char **argv; int x; Me = *argV; argc = argC; argv = replicate(argC,argV); for (x=0; x