php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57874 FORTIFY_SOURCE
Submitted: 2007-10-13 06:07 UTC Modified: 2007-10-26 03:06 UTC
From: oeriksson at mandriva dot com Assigned:
Status: Closed Package: bbcode (PECL)
PHP Version: 5.2.1 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: oeriksson at mandriva dot com
New email:
PHP Version: OS:

 

 [2007-10-13 06:07 UTC] oeriksson at mandriva dot com
Description:
------------
Hi. I'm using latest Mandriva Linux 2008.0 with php-5.2.4 + suhosin 0.9.20.

When I compile it with the default RPM gcc optimizations I get this build error:


 gcc -I/home/oden/RPM/BUILD/bbcode-0.10.3/lib -I. -I/home/oden/RPM/BUILD/bbcode-0.10.3 -DPHP_ATOM_INC -I/home/oden/RPM/BUILD/bbcode-0.10.3/include -I/home/oden/RPM/BUILD/bbcode-0.10.3/main -I/home/oden/RPM/BUILD/bbcode-0.10.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions -fno-omit-frame-pointer -c /home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c  -fPIC -DPIC -o lib/.libs/bstrlib.o
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2751: error: expected declaration specifiers or '...' before numeric constant
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2751: error: expected declaration specifiers or '...' before '__builtin_object_size'
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2751: warning: conflicting types for built-in function '__builtin___vsnprintf_chk'
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c: In function 'bformata':
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2799: warning: passing argument 3 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2799: warning: passing argument 4 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2799: error: too many arguments to function '__builtin___vsnprintf_chk'
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c: In function 'bassignformat':
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2847: warning: passing argument 3 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2847: warning: passing argument 4 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2847: error: too many arguments to function '__builtin___vsnprintf_chk'
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c: In function 'bformat':
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2894: warning: passing argument 3 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2894: warning: passing argument 4 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2894: error: too many arguments to function '__builtin___vsnprintf_chk'
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c: In function 'bvcformata':
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2942: warning: passing argument 3 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2942: warning: passing argument 4 of '__builtin___vsnprintf_chk' makes pointer from integer without a cast
/home/oden/RPM/BUILD/bbcode-0.10.3/lib/bstrlib.c:2942: error: too many arguments to function '__builtin___vsnprintf_chk'



If I remove the "-Wp,-D_FORTIFY_SOURCE=2" part it builds fine but then I get the runtime error reported in http://pecl.php.net/bugs/bug.php?id=12240


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-26 03:06 UTC] xavier at bmco dot eu
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/bbcode

Corrected in 0.10.4 

Avoided the extern declaration if FORTIFY_SOURCE is define

Tested with FORTIFY_SOURCE 1 / 2 and undefined
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 06:01:27 2025 UTC