Re: Bus error when writing in a typed file

Maurice Lombardi <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
Le 17/11/2012 16:13, Baudouin Le Charlier a écrit :
>   I am using a Mac OS X 10.6.8. I have downloaded GNU Pascal for Mac Os fromhttp://www.microbizz.nl/gpc.html. I have been using GNU Pascal for writing very simple programs for an introductory programming course and it worked fine until I wrote the following program for which I got a "bus error" when writing a first record in the file (at line 128). Notice that the program executes without errors when compiled with free pascal compiler.

It works also with old BP !
I find the same error (SIGSEGV) under DJGPP, MingW and Linux 64bits
Seems to be a serious bug of GPC.
Incidentally, when investigating with GDB, I found that the two variants 
of the record "personne" are consecutive instead of sharing the same 
placein memory, and the SizeOf(p) = 844 for a 32 bits system is 
consistent with that. It is indeed said in the docs that place sharing 
is not mandatory, but I have used this very frequently in the past !

Maurice

-- 
        Maurice Lombardi
Laboratoire Interdisciplinaire de Physique,
     (ex Spectrometrie Physique)
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex     FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:[email protected]

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.