To remind you once again. ISOLINUX >= 6.00 built with GCC >= 5.0.0 causes a broken boot. This relates specifically to the use of the vesamenu.c32, menu.c32 works without problemos. This "code" is already in 6.03, therefore this is not a fix for it! Revert "SYSAPPEND: Fix space stripping" This reverts commit 3106dcd http://repo.or.cz/w/syslinux.git/commit/3106dcd Fixes broken boot via vesamenu.c32 for the current git - 5186539 2015-06-27 version 6.04 2015 built with gcc version 5.1.1 --- com32/elflink/ldlinux/readconfig.c | 2 +- com32/menu/readconfig.c | 2 +- core/sysappend.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 381b43f..dcdf91b 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src) char c; while ((c = *src++)) { - if (c <= ' ' || c == '\x7f') { + if (c <= ' ' && c == '\x7f') { if (!was_space) *dst++ = '_'; was_space = true; diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index 257b042..b7814be 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src) char c; while ((c = *src++)) { - if (c <= ' ' || c == '\x7f') { + if (c <= ' ' && c == '\x7f') { if (!was_space) *dst++ = '_'; was_space = true; diff --git a/core/sysappend.c b/core/sysappend.c index 758703e..5c3f650 100644 --- a/core/sysappend.c +++ b/core/sysappend.c @@ -35,7 +35,7 @@ static char *copy_and_mangle(char *dst, const char *src) char c; while ((c = *src++)) { - if (c <= ' ' || c == '\x7f') { + if (c <= ' ' && c == '\x7f') { if (!was_space) *dst++ = '_'; was_space = true; -- 2.4.5
On Wed, Jul 1, 2015 at 4:35 AM, poma <pomidorabelisima at gmail.com> wrote:> > To remind you once again. > ISOLINUX >= 6.00 built with GCC >= 5.0.0 causes a broken boot. > This relates specifically to the use of the vesamenu.c32, > menu.c32 works without problemos.isolinux-debug.bin is not for diagnosing issues with *menu.c32. Let's start over since your problem statement has a bit of confusion. 1) You never said if you saw tests to get just the core (isolinux.bin and ldlinux.c32) loaded. Did you try my simple config? #syslinux.cfg-begin DEFAULT linux PROMPT 1 LABEL linux LINUX vmlinuz APPEND initrd=myinitrd.cgz my-options #syslinux.cfg-end 2) If that passes, the core is OK and let's look at loading simple COM32s like ls.c32. Does ls.c32 work? 3) If that passes, reading the file system and loading linked libraries are OK. Next, from a "boot: " prompt with the simple config, execute "menu.c32" or "vesamenu.c32" -- -Gene
On 01.07.2015 12:10, Gene Cumm wrote:> On Wed, Jul 1, 2015 at 4:35 AM, poma <pomidorabelisima at gmail.com> wrote: >> >> To remind you once again. >> ISOLINUX >= 6.00 built with GCC >= 5.0.0 causes a broken boot. >> This relates specifically to the use of the vesamenu.c32, >> menu.c32 works without problemos. > > isolinux-debug.bin is not for diagnosing issues with *menu.c32. Let's > start over since your problem statement has a bit of confusion. > > 1) You never said if you saw tests to get just the core (isolinux.bin > and ldlinux.c32) loaded. Did you try my simple config? > > > #syslinux.cfg-begin > DEFAULT linux > PROMPT 1 > > LABEL linux > LINUX vmlinuz > APPEND initrd=myinitrd.cgz my-options > #syslinux.cfg-end >PASSED> > 2) If that passes, the core is OK and let's look at loading simple > COM32s like ls.c32. Does ls.c32 work? >PASSED> 3) If that passes, reading the file system and loading linked > libraries are OK. Next, from a "boot: " prompt with the simple > config, execute "menu.c32" or "vesamenu.c32" >PASSED -and- PASSED Patch, pack and drive! syslinux-6.04-pre1
On Wed, Jul 01, 2015 at 10:35:51AM +0200, poma via Syslinux wrote:> --- a/com32/elflink/ldlinux/readconfig.c > +++ b/com32/elflink/ldlinux/readconfig.c > @@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src) > char c; > > while ((c = *src++)) { > - if (c <= ' ' || c == '\x7f') { > + if (c <= ' ' && c == '\x7f') { > if (!was_space) > *dst++ = '_'; > was_space = true;c <= ' ' and c == '\x7f' will never be true c <= ' ' or c == '\x7f' c <= ' ' || c == '\x7f' might be true
On 07/01/2015 01:35 AM, poma via Syslinux wrote:> > diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c > index 381b43f..dcdf91b 100644 > --- a/com32/elflink/ldlinux/readconfig.c > +++ b/com32/elflink/ldlinux/readconfig.c > @@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src) > char c; > > while ((c = *src++)) { > - if (c <= ' ' || c == '\x7f') { > + if (c <= ' ' && c == '\x7f') { > if (!was_space) > *dst++ = '_'; > was_space = true;I think I see the problem. "char" should be "unsigned char"... -hpa
Hi, Ady wrote:> IMHO, the adequate way to solve the problem is finding why vesamenu.c32 > triggers a problem when it is compiled with gcc v.5+.I agree. Currently i am riddling why copy_sysappend_string() should be invoked at all. txt/syslinux.cfg.txt obviously describes the .cfg interface of readconfig.c:record() as "SYSAPPEND" and its flag values. Rawhide-Live-Xfce-628.iso from http://goo.gl/Gm4ffO has no such directive. So probably it's about the change in core/sysappend.c function copy_and_mangle() which might be called underneath execute() of com32/elflink/ldlinux/execute.c. But this still does not explain why gcc versions are decisive for success. For that we'd need to find some code of undefined behavior, where the compiler would be free to produce different outcome. hpa wrote:> I think I see the problem. "char" should be "unsigned char"...Well, "char" zapps the characters above (unsigned char) 127. But why does the gcc version have an influence ? (C does not specify the signedness of char, but i never saw a compiler which represented char other than as signed char.) Have a nice day :) Thomas