Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!ira.uka.de!smurf!subnet.sub.net!altger!rainbow From: rainbow@altger.UUCP (rainbow) Newsgroups: comp.os.minix Subject: minix cron dumping core due to missing 'extern char *malloc()' Keywords: minix cron source-bug core Message-ID: <233@altger.UUCP> Date: 1 Dec 90 10:54:49 GMT Distribution: comp.os.minix Organization: /usr/lib/news/organization Lines: 18 Hi guys, I don't know whether this has been in the net already - if it has just forget about this one :-) A friend of mine hab a problem with running cron(1) on his minix/st. Whenever cron was started it dumped core; sometimes the whole system went down(?) [this shouldn't happen, huh?] I finally tracked down the problem to cron calling malloc() without having declared it returning a pointer instead of an int. Since MINIX "int"s are only 16 bits the 32-bit char* is casted to a 16-bit int, then again (?) assigned to a pointer, what results in an incorrect address. After having inserted an "extern char *malloc();" into the cron:main() function all is running well. Funnily indead I know that on another installation cron is running well on a minix/pc(386). Comments (preferably mail) appreciated. Joerg F. Trinitis alias rainbow@altger.alt.sub.org