Bug 1438 - Operations on undefined _FORTIFY_SOURCE and __USE_FORTIFY_LEVEL
Summary: Operations on undefined _FORTIFY_SOURCE and __USE_FORTIFY_LEVEL
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.5
: P2 normal
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks: libc236
  Show dependency treegraph
 
Reported: 2005-10-08 04:16 UTC by Pavel Roskin
Modified: 2016-05-20 19:55 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments
Patch against CVS glibc (316 bytes, patch)
2005-10-08 04:21 UTC, Pavel Roskin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Roskin 2005-10-08 04:16:33 UTC
There are several places in the headers when _FORTIFY_SOURCE and
__USE_FORTIFY_LEVEL are used even though they are undefined.  GNU cpp doesn't
report warnings in system includes, but sparse does:

/usr/include/features.h:265:5: warning: undefined preprocessor identifier
'_FORTIFY_SOURCE'
/usr/include/sys/cdefs.h:264:6: warning: undefined preprocessor identifier
'__USE_FORTIFY_LEVEL'
/usr/include/stdio.h:833:5: warning: undefined preprocessor identifier
'__USE_FORTIFY_LEVEL'
/usr/include/string.h:420:6: warning: undefined preprocessor identifier
'__USE_FORTIFY_LEVEL'
/usr/include/unistd.h:1051:5: warning: undefined preprocessor identifier
'__USE_FORTIFY_LEVEL'
Comment 1 Pavel Roskin 2005-10-08 04:21:35 UTC
Created attachment 692 [details]
Patch against CVS glibc

This patch is sufficient to make current sparse stop complaining.
Comment 2 Sourceware Commits 2005-10-08 06:27:46 UTC
Subject: Bug 1438

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2005-10-08 06:27:44

Modified files:
	include        : features.h 

Log message:
	2005-10-07  Roland McGrath  <roland@redhat.com>
	
	[BZ #1438]
	* include/features.h: Make tests on _FORTIFY_SOURCE and __OPTIMIZE__
	friendly to -Wundef.
	(__USE_FORTIFY_LEVEL): Always define it, to 0 if nothing else.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/features.h.diff?cvsroot=glibc&r1=1.38&r2=1.39

Comment 3 Ulrich Drepper 2005-10-14 06:26:46 UTC
Change checked in.