Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 424557 - app-misc/screen-4.0.3-r5: please use append-cppflags for preprocessor flags
Summary: app-misc/screen-4.0.3-r5: please use append-cppflags for preprocessor flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords: NeedPatch
Depends on: 425084 442070
Blocks:
  Show dependency tree
 
Reported: 2012-07-02 19:45 UTC by Pacho Ramos
Modified: 2012-11-13 19:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Pass CPPFLAGS into comm.sh when building comm.h (screen-4.0.3-cppflags.patch,829 bytes, patch)
2012-11-06 04:30 UTC, John W. O'Brien
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2012-07-02 19:45:44 UTC
I got this warning:

QA: configure
please use append-cppflags for preprocessor flags
please use append-cppflags for preprocessor flags

Thanks

Reproducible: Always
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-07-02 21:05:37 UTC
"special" build system, CANTFIX
Comment 2 Pacho Ramos gentoo-dev 2012-07-07 04:07:36 UTC
Per bug 425084 it should be fixed... but I guess a patch is needed :S
Comment 3 Sven Wegener gentoo-dev 2012-11-04 21:52:13 UTC
Now using append-cppflags.
Comment 4 John W. O'Brien 2012-11-06 04:30:06 UTC
Created attachment 328514 [details, diff]
Pass CPPFLAGS into comm.sh when building comm.h

This change causes app-misc/screen to generate an inoperable binary when built without USE="nethack".

The problem arises because comm.sh uses the C preprocessor to generate comm.h from comm.c and config.h. When CPPFLAGS are not visible to comm.sh, RC_NETHACK is omitted from comm.h but "nethack" appears in comm.c. All commands that are lexicographically greater than "nethack" end up being processed off-by-one inside process.c:DoAction(). Under the default configuration, "silentwait" from /etc/screenrc is the first affected command and is processed as "silent". This causes a segfault upon dereferencing a null fore pointer.

The user-visible symptoms are that screen will appear to hang when invoked. A process list shows two screen instances, one marked "[<defunct>]".

The attached patch fixes the regression so that screen builds and runs with or without USE="nethack".
Comment 5 Godfath3r 2012-11-06 18:46:51 UTC
See this please: #442070
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2012-11-06 19:15:56 UTC
Please do not commit such hacks to stable ebuilds.