[#6573] newlib new fail case: newlib.stdlib/size_max.c execution

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

[#6573] newlib new fail case: newlib.stdlib/size_max.c execution

Submitted By: Mingquan Pan

Open Date

2011-05-03 03:53:06    

Priority:

Medium     Assignee:

Stuart Henderson

Board:

N/A     Silicon Revision:

Resolution:

Assigned (Not Started)     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Open     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: newlib new fail case: newlib.stdlib/size_max.c execution

Details:

 

newlib new fail case: newlib.stdlib/size_max.c execution.

 

#########################################

#

# Comparing newlib-4.3-bf532-none-mid-shared-library-newlib.sum

#

########################################

New tests that FAIL:

 

bfin-elf-sim: newlib.stdlib/size_max.c execution

 

New tests that PASS:

 

bfin-elf-sim: newlib.stdlib/size_max.c compilation

 

detailed log:

 

Running /home/test/work/cruise/checkouts/toolchain/binutils-2.21/newlib/testsuite/newlib.stdlib/stdlib.exp ...

Executing on host: bfin-elf-gcc /home/test/work/cruise/checkouts/toolchain/binutils-2.21/newlib/testsuite/newlib.stdlib/size_max.c   -mcpu=bf532-none -mid-shared-library  -I/home/test/work/cruise/temp/regtest_build4.3/gcc-4.3.5_build/newlib/testsuite/bf532-none/mid-shared-library/targ-include -msim   -B/home/test/work/cruise/temp/regtest_build4.3/gcc-4.3.5_build/newlib/testsuite/bf532-none/mid-shared-library -L/home/test/work/cruise/temp/regtest_build4.3/gcc-4.3.5_build/newlib/testsuite/bf532-none/mid-shared-library  -I/home/test/work/cruise/checkouts/toolchain/binutils-2.21/newlib/testsuite/include -lm  -msim -o /home/test/work/cruise/temp/regtest_build4.3/gcc-4.3.5_build/newlib/testsuite/bf532-none/mid-shared-library/size_max.x    (timeout = 300)

PASS: newlib.stdlib/size_max.c compilation

Unhandled exception 0x24 at 0x0000000a (Unaligned data access)^M

program stopped with signal 4 (Illegal instruction).^M

FAIL: newlib.stdlib/size_max.c execution

 

Follow-ups

 

--- Mike Frysinger                                           2011-05-04 02:12:48

the issue is with -mid-shared-library.  the gcc init code attempts to load the

symbol _current_shared_library_p5_offset_, but that is only provided by elf2flt.

since this is bfin-elf/-msim, elf2flt is never run, and so that symbol has a

value of 0 (it's weak).  subsequently, the init code loads up arbitrary .text

data (since .text sits at address 0) as the value of the p5 offset, and then

tries to do a 32bit load off of that.

 

insn:     0x000006                  -P5 = [P5 + 0x0];

core:     0x000006                  -DBUS FETCH 4 bytes @ 0x00000000:

0xe800014d

reg:      0x000006                  -wrote P5 = 0xe800014d

core:     0x00000a                  -IBUS FETCH 2 bytes @ 0x0000000a: 0xe52a

core:     0x00000a                  -IBUS FETCH 2 bytes @ 0x0000000c: 0x0009

insn:     0x00000a                  -P2 = [P5 + 0x24];

reg:      0x00000a                  -wrote EXCAUSE = 0x24 (SEQSTAT = 0x24)

Unhandled exception 0x24 at 0x0000000a (Unaligned data access)

 

i dont see how -msim/-mid-shared-library ever worked unless by pure accident

 

--- Mingquan Pan                                             2011-10-12 04:23:43

It remains the same failure in 2011R1-RC2 testing log.

 

--- Stuart Henderson                                         2011-10-13 08:59:30

is there a reason this was bumped up to priority 2?  if it only happens

-msim/-mid-shared-library then it doesn't seem like a huge priority.

 

--- Sonic Zhang                                              2011-10-14 01:48:04

Hi Stuart,

Priority 2 means this bug is expected to be fixed for 2011R1. Is this OK to

you?

 

 

--- Stuart Henderson                                         2011-10-14 05:03:03

Hi Sonic,

i don't understand why this one has been chosen as a priority though, when i

had thought it relatively low impact.  that's what i was hoping you could

explain.

Thanks.

 

--- Sonic Zhang                                              2011-10-28 00:05:57

Since this is a bug in rare used compiler switch, delay after 2011R1.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes