From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5e14b051b7a02efa X-Google-Attributes: gidfee84,public From: iglesias@draco.acs.uci.edu (Mike Iglesias) Subject: Re: Sun C code compiled on OSF/1?? Date: 1995/07/20 Message-ID: <3umk8c$9qr@news.service.uci.edu>#1/1 X-Deja-AN: 106587473 references: <3umh4p$amh@agate.berkeley.edu> organization: University of California, Irvine newsgroups: comp.unix.osf.osf1 In article <3umh4p$amh@agate.berkeley.edu>, Andy C. Hsia wrote: >In light of the recent incident regarding reading README files first, >etc, let me say that I have read all the documentation that came with the >code, I've tried many minor modifications to the code, and I'm not an >experienced cc user. If I had to guess, I'd say that simply commenting >out the offending lines caused the variables to be defined as the wrong >type, therefore doesn't solve my problem. My question is why doesn't the >successfully compiled program run properly and what should I look for in >fixing it? Thanks There are many things that can cause problems, the two most common I've seen are assuming that a pointer or a long is the same size as an int. Pointers and longs are 64 bits on Alphas, so trying to stuff either of those into an int is going to cause problems (usually a segmentation fault). Using "lint -Q" may help here; see the lint man page for more details. You could try running the program under dbx, and after you see it looping, hit ^C and type "where". This will show you the calling stack so you have an idea which routine the program is currently in. If you can find someone who knows their way around C and dbx that would help you find the problem. -- Mike Iglesias Internet: iglesias@draco.acs.uci.edu University of California, Irvine phone: (714) 824-6926 Office of Academic Computing FAX: (714) 824-2069