Thread View: net.bugs.usg
1 messages
1 total messages
Started by Andrew C. Eisenberg
Mon, 06 Jan 1986 20:33
AT&T PC7300 Compiler - 32k bug
Author: Andrew C. Eisenberg
Date: Mon, 06 Jan 1986 20:33
Date: Mon, 06 Jan 1986 20:33
34 lines
2170 bytes
2170 bytes
Recently when transferring a C program from a 3B2 to a PC7300, I ran into this bug: When a function in a program has a data space exeeding 32K bytes (words?) of memory, the assembler code produced by the compiler produces an illegal relative branch that would require more than 16bits to execute on a function call. This was found out in a call to the AT&T hotline. Our PC7300 is using UNIX 3.04 with UNIX 2 development tools. However, the same error also occurred on another PC7300 with UNIX 2.0.0.4 and the same development tools. According to the hotline, a similar problem has occurred with FORTRAN which we do not use here. Solutions: 1) Split up the offending function into smaller functions and recompile (with separate modules?) 2) Make some of the data global, but this allegedly has a similar 32k limit. 3) If you need more than 32k use malloc. 4) Make your data structure smaller! In my case, 4 was the solution since I had overgenerously allocated data space. If you haven't heard this before, then you have been WARNED! If you have experienced this problem before and have responses or clarifications, then please post to the net. -------------------------------------------------------------------------------- ________________ ________________ /___| | | | / []|| ROADWAY | | ROADWAY | |____||______________|-|______________| O-----O O O O Andrew C. Eisenberg -- rexago1!bc10@Case.CSNET - for you internet folks ...!decvax!cwruecmp!rexago1!bc10 - for UUCP "Beam me up Scotty, there is no intelligent life here!"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads