Gene Cumm
2015-Sep-13 13:52 UTC
[syslinux] EFI: HP + syslinux = crash [ brown paper bag update ]
On Sun, Sep 13, 2015 at 9:22 AM, Patrick Masotta <masottaus at yahoo.com> wrote:> >>>> > > It is also working here; I think this particular PNG issue is fixed. > > > > It's worth to mention that the replaced code looks valid to me; that's why I think > > this is probably some sort of compiler bug. It was really hard to find. > > We should keep an eye on this issue; it might appear somewhere else. > > Eww. The original code was merely an empty > define. That's pretty nasty. > > Alternatively, we could void them > > -# define Assert(cond,msg) > +# define Assert(cond,msg) ((void)0) > > -- > -Gene > <<< > > > The empty define should work; actually it did work for many years... > > Your just proposed change was my first attempt for solving this but for some > reason it did not work. After testing a lot the only way I've found to solve this > bug was defining a "real" empty function. I know, 100% hacky but it works.If the voiding doesn't work, we'll need that function in another 44 lines of code, spread throughout the source. -- -Gene
Patrick Masotta
2015-Sep-13 14:14 UTC
[syslinux] EFI: HP + syslinux = crash [ brown paper bag update ]
>>>> > The empty define should work; actually it did work for many years... > > Your just proposed change was my first attempt for solving this but for some > reason it did not work. After testing a lot the only way I've found to solve this > bug was defining a "real" empty function. I know, 100% hacky but it works. If the voiding doesn't work, we'll need that function in another 44 lines of code, spread throughout the source. -- -Gene <<< You might be right; I have mentioned before that this bug could probably impact other parts of the code. So far I'm continually using vesamenu.c32 with PNG images w/o any problem. But the Zlib code is surely used in many more places! I really do not know why the compiler is not correctly parsing the void function or if there is a particular condition that triggers this behavior in this particular case. This issue is very hard to trace/reproduce/debug/report, etc. a real PITA. Best, Patrick
Gene Cumm
2015-Sep-13 16:00 UTC
[syslinux] EFI: HP + syslinux = crash [ brown paper bag update ]
On Sun, Sep 13, 2015 at 10:14 AM, Patrick Masotta <masottaus at yahoo.com> wrote:> >>>> > > > > The empty define should work; actually it did work for many years... > > > > Your just proposed change was my first attempt for solving this but for some > > reason it did not work. After testing a lot the only way I've found to solve this > > bug was defining a "real" empty function. I know, 100% hacky but it works. > > If the voiding doesn't work, we'll need that function in another 44 > lines of code, spread throughout the source. > > -- > -Gene > <<< > > You might be right; I have mentioned before that this bug could probably impact other parts of the code. > So far I'm continually using vesamenu.c32 with PNG images w/o any problem. But the Zlib code > is surely used in many more places! > > I really do not know why the compiler is not correctly parsing the void function or if > there is a particular condition that triggers this behavior in this particular case. > This issue is very hard to trace/reproduce/debug/report, etc. a real PITA.Smells of an optimizer/stripper bug :( Patrick, Oscar, what specific build tools are you two using? GNU ld (GNU Binutils for Debian) 2.22 gcc version 4.7.2 (Debian 4.7.2-5) NASM version 2.10.01 Trying to recall if there's other utility packages. -- -Gene
Seemingly Similar Threads
- EFI: HP + syslinux = crash [ brown paper bag update ]
- EFI: HP + syslinux = crash [ brown paper bag update ]
- EFI: HP + syslinux = crash [ brown paper bag update ]
- EFI: HP + syslinux = crash [ brown paper bag update ]
- EFI: HP + syslinux = crash [ brown paper bag update ]