Debugging mediaplayer corruption issues

This only fixes it for FFmpeg and not the kernel, correct? Does
anyone know where the failure is when compiling the kernel with this
toolchain and why we are still using csl2007q3 in Angstrom?

Jason Kridner wrote:

This commit:http://git.mansr.com/?p=ffmpeg.mru;a=commitdiff;h=14a339339ad6b9cfd00
also fix the bug with gcc4.3.1.

This only fixes it for FFmpeg and not the kernel, correct? Does
anyone know where the failure is when compiling the kernel with this
toolchain and why we are still using csl2007q3 in Angstrom?

There was a recent patch to the -rc kernel.org git repo that made 4.3 suddenly
work for me and EABI targets. I think it was this one:

commit 16f719de62809e224e37c320760c3ce59098d862
Author: Nicolas Pitre <nico@cam.org>

    [ARM] 5196/1: fix inline asm constraints for preload

    With gcc 4.3 and later, a pointer that has already been dereferenced is
    assumed not to be null since it should have caused a segmentation fault
    otherwise, hence any subsequent test against NULL is optimized away.

    Current inline asm constraint used in the implementation of prefetch()
    makes gcc believe that the pointer is dereferenced even though the PLD
    instruction does not load any data and does not cause a segmentation
    fault on null pointers, which causes all sorts of interesting results
    when reaching the end of a linked lists for example.

    Let's use a better constraint to properly represent the actual usage of
    the pointer value.

    Problem reported by Chris Steel.

    Signed-off-by: Nicolas Pitre <nico@marvell.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index b01d5e7..517a4d6 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -112,9 +112,9 @@ extern int kernel_thread(int (*fn)(void *), void *arg,
unsigned long flags);
static inline void prefetch(const void *ptr)
{
        __asm__ __volatile__(
- "pld\t%0"
+ "pld\t%a0"
                :
- : "o" (*(char *)ptr)
+ : "p" (ptr)
                : "cc");
}

b.g.

My understanding was that it was corrected:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5196/1

Koen and Mans probably know more about that.

Laurent

Jason Kridner <jkridner@gmail.com> writes:

This commit:http://git.mansr.com/?p=ffmpeg.mru;a=commitdiff;h=14a339339ad6b9cfd00
also fix the bug with gcc4.3.1.

This only fixes it for FFmpeg and not the kernel, correct? Does

That was a bug in my code. It worked by accident with older gcc
versions.

anyone know where the failure is when compiling the kernel with this
toolchain and why we are still using csl2007q3 in Angstrom?

If built with gcc 4.3, the kernel used to crash early during boot, as
discussed in http://thread.gmane.org/gmane.linux.ports.arm.general/10760
This was fixed in 2.6.27-rc4, so it's included in recent linux-omap
git trees.

I haven't tried building with gcc 4.3, so I don't know whether other
bugs are lurking.

"Laurent Desnogues" <laurent.desnogues@gmail.com> writes: