[vdr] OT: local variables limited in size to (8*1024*1024-32*1024) bytes ?

Stefan Lucke stefan at lucke.in-berlin.de
Sat Nov 29 10:59:34 CET 2008


Hi,

the attached program segfaults when using a larger local variable.

Depending on used value I get segfaulst at different locations.

//#define BUFSIZE (9*1024*1024-16*1024) // only segfault
#define BUFSIZE (8*1024*1024-16*1024) // hello + segfault
//#define BUFSIZE (8*1024*1024-32*1024) // hello + 2nd line

When using last definition of BUFSIZE every thing is fine.


stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ ./test
Speicherzugriffsfehler
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ vi test.cc
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ g++   -g  test.cc   -o test
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ ./test
hello
./test: argc = 1
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ vi test.cc
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ g++   -g  test.cc   -o test
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ ./test
hello
Speicherzugriffsfehler
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ ./test
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ ulimit
unlimited
stefan at jarada /home/nfs/extra/src/video/DVB/xlist $ gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Copyright (C) 2006 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

-- 
Stefan Lucke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 657 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20081129/7446f97e/attachment-0001.cc 


More information about the vdr mailing list