develooper Front page | perl.perl5.porters | Postings from December 2009

Intermittent "*** buffer overflow detected ***" errors with -D_FORTIFY_SOURCE=2 (?)

Thread Next
Cosimo Streppone
December 5, 2009 09:17
Intermittent "*** buffer overflow detected ***" errors with -D_FORTIFY_SOURCE=2 (?)
Message ID:
Hi perl5-porters,

I'm trying to work on an "interesting" problem.
It regards an XS module I wrote some time ago.
This module used to work perfectly under various Linux distributions,
including RHEL4, and Win32.

Now, with RHEL5, it's been reported to crash with "*** buffer overflow
detected ***" messages,
presumably when using `call_sv()' from XS code.

After digging a bit into the problem, it seems that the use of
in conjunction with and -O2 in $CFLAGS is causing these (fake?) buffer

Actually the problems are intermittent: that is, if I run the test
suite of the module,
it fails maybe 40%-50% of the times. Horrible.

Reading briefly about _FORTIFY_SOURCE=2 from people having the same problem,
it would seem to me that it is just a really bad idea to have that enabled
for a perl (interpreter and modules) installation. Unfortunately, this
is the default in $CFLAGS for RHEL5.

So, coming to the question, has any of you dealt with this before?
Any advice?


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About