Frank D. Engel, Jr. wrote:
Okay, here goes:
The program is a compiler for a modified version of Pascal, which I am designing as part of my Master's project. The program converts code from the modified Pascal dialect into Objective C code. One concept of my objective is to be able to write and compile Cocoa programs with a Pascal-type syntax.
A very interesting project.
And the program now crashes with a bus error (opas is the program compiled with GPC, then opas is run on the file opas_sys.pas to produce opas_sys.m and opas_sys.h, which are handed to GCC to generate opas_sys.o):
Pardon me asking, but did you try to increase the stacksize ?
[G4:~/gnu/testgpc/adriaan] adriaan% limit stacksize 4096
Frank Heckenbach wrote:
Like Adriann said, without a reproducing case, we can't help you much.
Can you send me full source code (with a makefile or building instructions) ? Then, we can see if we can reproduce it on Mac OS X and possibly on other platforms.
It may be a GPC bug, it may also be a bug in your code (think of undefined values). Chances that it will be fixed by accident (if it's a GPC bug at all) are minimal.
Try the following, to check for uninitialized variables:
[G4:~/gnu/testgpc/adriaan] adriaan% gpc opas.pas -O1 -Wuninitialized
Regards,
Adriaan van Os