This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

CBugReport


Dear GCC friends (user=gcc-bugs@gcc.gnu.org)[subject=CBugReport],


On 03/07/2000 I did send you the following report :

     The following C program on Linux systems (Mandrake as well as
     RedHat) :

          int  main()
               {
               double    array[1100000];
               exit();
               }

     gives a "Segmentation fault" message at run-time. It was compiled
     using the 'gcc -g' command, when 'gcc -v' gives the following
     output :

          Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/specs
          gcc version 2.95.2 19991024 (release)

     It looks like a 8 MB limit for the stack.

And I did receive the following answer (from oliva@lsd.ic.unicamp.br) :

     Yes, most likely.  A limit imposed by the OS, that you can customize with `ulimit'.

That is perfectly correct. But I should like to say that the "Segmentation
fault" message appears before the first instruction of the C program is
issued. Then the loader should be aware of this problem for it has all
the information needed (user's stack size, stack size needed for the program,...).
And the loader should say something like "I am not able to run your program
because of insufficient stack space, please increase using ulimit..." as, for
example, the SGI C optimizer is doing when the input parameters are incompatible
with the job to be done.


Thank you in advance...



Sincerely yours,



Jean-Francois  COLONNA

         CMAP
    Room  00.20.16
 ECOLE  POLYTECHNIQUE
91128  Palaiseau Cedex
        France

WWW.... = http://www.lactamme.polytechnique.fr/
Phone.. = +33 (0)1 69 33 40 53
....... = +33 (0)1 69 33 41 50
Fax.... = +33 (0)1 69 33 30 11
E-mail. = colonna@cmap.polytechnique.fr
....... = 70.jf.colonna@aist.enst.fr
....... = colonna@ieee.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]