Skip to contentSkip to conversation

Fix Pseudo on hosts with older compilers

PATCH Applied Joshua Lock 3 participants 4 messages Jul 20, 2011

lore
Share & tools
lore
#0 lore raw

cover Fix Pseudo on hosts with older compilers

The realpath_fix patch included an unitialised variable which modern GCC cleverly optimises away, however hosts with older GCC like CentOS 5.x weren't so lucky and... BOOM.

See http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/commit/?id=4a646c8bbe73ca830cb8c2e80be4b457d925cdd4 for a more detailed description.

The following changes since commit 6ca80453618fa308cc2d6329450aaf5dfdf2d610:

Fixed concurrency problem for ZIP packed recipes. (2011-07-19 18:03:04 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/pseudo
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/pseudo

Joshua Lock (1):
pseudo: fix uninitialised variable in realpath_fix.patch

 .../pseudo/pseudo/realpath_fix.patch               |    2 +-
 meta/recipes-devtools/pseudo/pseudo_1.1.1.bb       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/1 pseudo: fix uninitialised variable in realpath_fix.patch

Several users reported issues with pseudo on CentOS 5.x hosts, Matthew McClintock tracked the issue to the realpath_fix.patch and Mark Hatle supplied the included fix.

CC Matthew McClintock <[email protected]>
CC Mark Hatle <[email protected]>
---
 .../pseudo/pseudo/realpath_fix.patch               |    2 +-
 meta/recipes-devtools/pseudo/pseudo_1.1.1.bb       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/pseudo/pseudo/realpath_fix.patch +1 -1
index 7beea51..4a107e0 100644
@@ -65,7 +65,7 @@ index 600a918..07a4429 100644
  
 +static void
 +pseudo_init_one_wrapper(pseudo_function *func) {
-+	int (*f)(void);
++	int (*f)(void) = (int (*)(void)) NULL;
 +	char *e;
 +	if (*func->real != NULL) {
 +		/* already initialized */
meta/recipes-devtools/pseudo/pseudo_1.1.1.bb +1 -1
index f1c8e63..0a61aec 100644
@@ -1,6 +1,6 @@
 require pseudo.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://oe-config.patch \
Signature · 1 line
1.7.6
#2 lore raw

Re: [PATCH 1/1] pseudo: fix uninitialised variable in realpath_fix.patch

Quoted 6 lines · Joshua Lock

Several users reported issues with pseudo on CentOS 5.x hosts, Matthew McClintock tracked the issue to the realpath_fix.patch and Mark Hatle supplied the included fix.

CC Matthew McClintock <[email protected]>
CC Mark Hatle <[email protected]>

Ack.. this has also already been included in the upstream pseudo.. when we move to pseudo 1.1.2 we'll get this fix.

--Mark

Quoted 31 lines
---
 .../pseudo/pseudo/realpath_fix.patch               |    2 +-
 meta/recipes-devtools/pseudo/pseudo_1.1.1.bb       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/pseudo/pseudo/realpath_fix.patch +1 -1
index 7beea51..4a107e0 100644
@@ -65,7 +65,7 @@ index 600a918..07a4429 100644
 
 +static void
 +pseudo_init_one_wrapper(pseudo_function *func) {
-+	int (*f)(void);
++	int (*f)(void) = (int (*)(void)) NULL;
 +	char *e;
 +	if (*func->real != NULL) {
 +		/* already initialized */
meta/recipes-devtools/pseudo/pseudo_1.1.1.bb +1 -1
index f1c8e63..0a61aec 100644
@@ -1,6 +1,6 @@
 require pseudo.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://oe-config.patch \
Applied
#3 lore raw
In reply to Joshua Lock
Quoted 14 lines · Joshua Lock

The realpath_fix patch included an unitialised variable which modern GCC cleverly optimises away, however hosts with older GCC like CentOS 5.x weren't so lucky and... BOOM.

See http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/commit/?id=4a646c8bbe73ca830cb8c2e80be4b457d925cdd4 for a more detailed description.

The following changes since commit 6ca80453618fa308cc2d6329450aaf5dfdf2d610:

Fixed concurrency problem for ZIP packed recipes. (2011-07-19 18:03:04 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/pseudo
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/pseudo

Quoted 7 lines

Joshua Lock (1):
pseudo: fix uninitialised variable in realpath_fix.patch

  .../pseudo/pseudo/realpath_fix.patch               |    2 +-
  meta/recipes-devtools/pseudo/pseudo_1.1.1.bb       |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

Merged into OE-Core

Thanks
Sau!