Bug 637019 - GCC 4.5.1 registers get clobbered when calling constructors
Summary: GCC 4.5.1 registers get clobbered when calling constructors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: avr-gcc
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Thibault North
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-24 02:21 UTC by Alastair D'Silva
Modified: 2010-10-12 03:14 UTC (History)
3 users (show)

Fixed In Version: avr-gcc-4.5.1-2.fc14
Clone Of:
Environment:
Last Closed: 2010-10-12 03:14:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alastair D'Silva 2010-09-24 02:21:41 UTC
Description of problem:
In gcc/config/avr/libgcc.S, revision 143306, a change to __do_global_ctors &
__do_global_dtors was made which makes use of register r20.

This register can be used to pass parameters to the constructors, but it is not
pushed/popped from the stack, so it will get clobbered if a constructor uses
that register.


Version-Release number of selected component (if applicable):
4.5.1

How reproducible:
Very

Steps to Reproduce:
1. Compile testcase submitted at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45263
  
Actual results:
AVR microcontroller continually reboots when running the compiled binary

Expected results:
AVR microcontroller executes code as expected

Additional info:
A patch has been supplied in the above bug which works around the problem.

Comment 1 Fedora Update System 2010-09-24 15:53:55 UTC
avr-gcc-4.5.1-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/avr-gcc-4.5.1-2.fc14

Comment 2 Thibault North 2010-09-24 15:58:24 UTC
Thanks for your report.
Please test the new package avr-gcc-4.5.1-2 
(or here for F-13: http://koji.fedoraproject.org/koji/taskinfo?taskID=2487224 )
I would love to know if it actually fixes the problem (I can't test it here).

Thanks,
Thibault

Comment 3 Fedora Update System 2010-09-24 22:02:05 UTC
avr-gcc-4.5.1-2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update avr-gcc'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/avr-gcc-4.5.1-2.fc14

Comment 4 Alastair D'Silva 2010-09-25 03:27:25 UTC
Tested & confirmed working on Fedora 13

Comment 5 Thibault North 2010-09-25 16:17:57 UTC
Great, thanks a lot for your help !

Comment 6 Fedora Update System 2010-10-12 03:14:11 UTC
avr-gcc-4.5.1-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.