[#6202] libmudflap 4.1/4.3 heap-scalestress.c test fail

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6202] libmudflap 4.1/4.3 heap-scalestress.c test fail

Submitted By: Vivi Li

Open Date

2010-08-23 23:19:05     Close Date

2012-06-15 02:38:35

Priority:

Medium     Assignee:

Mingquan Pan

Stuart Henderson

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

4.3 trunk head     kernel rev.:

State:

Closed     Found In Release:

N/A

Is this bug repeatable?:

N/A     

Summary: libmudflap 4.1/4.3 heap-scalestress.c test fail

Details:

 

libmudflap 4.1/4.3 heap-scalestress.c execution fail.

 

List of heap-scalestress.c related test:

--

PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c execution test

FAIL: libmudflap.c/heap-scalestress.c output pattern test

 

PASS: libmudflap.c/heap-scalestress.c (-static) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-static) execution test

FAIL: libmudflap.c/heap-scalestress.c (-static) output pattern test

 

PASS: libmudflap.c/heap-scalestress.c (-O2) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O2) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O2) output pattern test

 

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

--

 

Example of failure:

--

spawn bfin-uclinux-gcc -ggdb3 -DDEBUG_ASSERT -I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite -I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/.. -I.. -L/.libs /home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/heap-scalestress.c -fmudflap -lmudflap -Wl,-elf2flt=-s80000 -L/testsuite -lm -o ./heap-scalestress.exe

PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

Executing on bfin-uclinux: /tmp/heap-scalestress.exe.13706    (timeout = 300)

Executing on bfin-uclinux: rm -f  /tmp/heap-scalestress.exe.13706    (timeout = 300)

Executed ./heap-scalestress.exe, status 1

allocating

SEGV

FAIL: libmudflap.c/heap-scalestress.c execution test

FAIL: libmudflap.c/heap-scalestress.c output pattern test

--

 

Follow-ups

 

--- Stuart Henderson                                         2010-10-07 05:26:32

mudflap causes this one to blow its stack, due to the recursion of

mfsplay_tree_splay_helper.  increasing the stack should be enough to make it

pass, however the testsuite doesn't seem to make this easy to do for a single

test as dg-options get placed before the existing -Wl,-elf2flt=-s80000 and so

gets ignored.

is there an established way to do this?

 

--- Mike Frysinger                                           2010-10-07 11:30:57

elf2flt parses -Wl,-elf2flt first followed by options in FLTFLAGS env

 

--- Stuart Henderson                                         2010-10-12 03:09:37

sorry, i don't understand how that would allow me to adjust the stack for a

single test within the testsuite.  could you clarify?

 

--- Mike Frysinger                                           2010-10-14 00:08:38

do tests allow you to export env vars from within tests ?

 

--- Stuart Henderson                                         2010-11-16 07:20:51

it appears not currently.  however I could easily add a dg-setenv option and use

that in the test.  i can't imagine it'd be accepted upstream though.

 

e.g.

 

Index: gcc-4.3/libmudflap/testsuite/lib/libmudflap.exp

===================================================================

--- gcc-4.3/libmudflap/testsuite/lib/libmudflap.exp     (revision 5002)

+++ gcc-4.3/libmudflap/testsuite/lib/libmudflap.exp     (working copy)

@@ -230,7 +230,25 @@

     return [target_compile $source $dest $type $options]

}

 

+#allow the setting of env vars on a test by test basis

+proc dg-setenv { args } {

+    if { [llength $args] > 4 } {

+       error "[lindex $args 0]: too many arguments"

+       return

+    }

 

+    if { [llength $args] >= 4 } {

+       switch [dg-process-target [lindex $args 3]] {

+           "S" { setenv [lindex $args 1] [lindex $args 2] }

+           "N" { }

+           "F" { error "[lindex $args 0]: `xfail' not allowed

here" }

+           "P" { error "[lindex $args 0]: `xfail' not allowed

here" }

+       }

+    } else {

+    setenv [lindex $args 1] [lindex $args 2]

+    }

+}

+

# A bit sloppy...  Returns a list of source files (full pathnames) to

# compile.  We mimic the mkcheck script in that the first time this is run,

# all existing files are listed in "testsuite_files" in the output

 

--- Mingquan Pan                                             2011-05-11 01:34:09

the latest fail status is:

 

PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

PASS: libmudflap.c/heap-scalestress.c execution test

FAIL: libmudflap.c/heap-scalestress.c output pattern test

PASS: libmudflap.c/heap-scalestress.c (-static) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-static) execution test

FAIL: libmudflap.c/heap-scalestress.c (-static) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O2) (test for excess errors)

PASS: libmudflap.c/heap-scalestress.c (-O2) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O2) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

 

detailed log is like:

Output pattern mudflap violation 1.*memcpy dest.*Nearby object.*mudflap dead

object.*malloc region.*alloc time.*dealloc time.*

Executing on host: bfin-linux-uclibc-gcc -ggdb3 -DDEBUG_ASSERT

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/..

-I.. -L/.libs

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/heap-scalestress.c

-O3 -fmudflap -lmudflap  -L/testsuite -ldl -lm  -mcpu=bf561-0.5  -o

./heap-scalestress.exe    (timeout = 300)

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

Executing on bfin-linux-uclibc: /tmp/heap-scalestress.exe.15481    (timeout =

300)

Executing on bfin-linux-uclibc: rm -f  /tmp/heap-scalestress.exe.15481  

(timeout = 300)

Executed ./heap-scalestress.exe, status 1

allocating

freeing

allocating

KILL

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

 

 

--- Stuart Henderson                                         2011-06-01 11:16:37

Fix checked in on trunk.

 

--- Mingquan Pan                                             2011-06-07 02:01:46

It looks this bug still exists here.

like:

 

Output pattern mudflap violation 1.*memcpy dest.*Nearby object.*mudflap dead

object.*malloc region.*alloc time.*dealloc time.*

Executing on host: bfin-uclinux-gcc -ggdb3 -DDEBUG_ASSERT

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/..

-I.. -L/.libs

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/heap-scalestress.c

-O3 -fmudflap -lmudflap -DSCALE=10000 -Wl,-elf2flt=-s80000  -L/testsuite -lm

-mcpu=bf561-0.5  -o ./heap-scalestress.exe    (timeout = 300)

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

Executing on bfin-uclinux: /tmp/heap-scalestress.exe.4184    (timeout = 300)

Executing on bfin-uclinux: rm -f  /tmp/heap-scalestress.exe.4184    (timeout =

300)

Executed ./heap-scalestress.exe, status 1

allocating

freeing

allocating

SEGV

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

Output pattern allocating.*freeing.*allocating.*freeing.*done

 

--- Stuart Henderson                                         2011-06-07 05:40:09

strange, it's passing for me.  does it fail every time for you?  or just

sometimes?

 

--- Mingquan Pan                                             2011-06-10 02:53:06

I check the log of these days and find that most of the heap-scalestress.c still

has failures. And the best results are:

 

test@43-bf561-toolchain:~/work/cruise/test_scripts/toolchain/toolchain-build>

grep -r "heap-scalestress.c"

toolchain-2011_Jun_07_15_39/tests/uclinux/libmudflap-4.3.sum

PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

PASS: libmudflap.c/heap-scalestress.c execution test

PASS: libmudflap.c/heap-scalestress.c output pattern test

PASS: libmudflap.c/heap-scalestress.c (-static) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-static) execution test

FAIL: libmudflap.c/heap-scalestress.c (-static) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O2) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O2) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O2) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

 

 

--- Stuart Henderson                                         2012-03-20 12:19:58

setting as fixed.

 

--- Mingquan Pan                                             2012-06-07 05:51:40

Still see failure in this case testing:

test@44-bf548-toolchain:~/work/cruise/test_scripts/toolchain/toolchain-build>

grep -r "heap-scalestress.c"

toolchain-2012_Jun_05_16_48/tests/uclinux/libmudflap-4.3.sum

PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c execution test

FAIL: libmudflap.c/heap-scalestress.c output pattern test

PASS: libmudflap.c/heap-scalestress.c (-static) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-static) execution test

FAIL: libmudflap.c/heap-scalestress.c (-static) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O2) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O2) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O2) output pattern test

PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

FAIL: libmudflap.c/heap-scalestress.c (-O3) execution test

FAIL: libmudflap.c/heap-scalestress.c (-O3) output pattern test

 

I checkout with several boards runing on various host either suse or ubuntu,

the result are about the same with a few fails left.

 

Are you getting the result by running toolchain-regtest or just running these

cases by hand?

 

--- Stuart Henderson                                         2012-06-08 12:55:10

yep, the unoptimised case was even less efficient.  should be fixed now.

 

--- Mingquan Pan                                             2012-06-15 03:39:59

Yeah, I see these cases pass on bf533 stamp board.

 

test@toolchain42-bf533stamp:~/work/cruise/test_scripts/toolchain/toolchain-build>

grep -nr heap-scalestress.c

toolchain-2012_Jun_14_19_09/tests/uclinux/libmudflap-4.3.sum

129:PASS: libmudflap.c/heap-scalestress.c (test for excess errors)

130:PASS: libmudflap.c/heap-scalestress.c execution test

131:PASS: libmudflap.c/heap-scalestress.c output pattern test

460:PASS: libmudflap.c/heap-scalestress.c (-static) (test for excess errors)

461:PASS: libmudflap.c/heap-scalestress.c (-static) execution test

462:PASS: libmudflap.c/heap-scalestress.c (-static) output pattern test

791:PASS: libmudflap.c/heap-scalestress.c (-O2) (test for excess errors)

792:PASS: libmudflap.c/heap-scalestress.c (-O2) execution test

793:PASS: libmudflap.c/heap-scalestress.c (-O2) output pattern test

1122:PASS: libmudflap.c/heap-scalestress.c (-O3) (test for excess errors)

1123:PASS: libmudflap.c/heap-scalestress.c (-O3) execution test

1124:PASS: libmudflap.c/heap-scalestress.c (-O3) output pattern test

 

So close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

libmudflap-4.3.tar.bz2    application/x-bzip2    21203    Vivi Li

Attachments

Outcomes