bugAVR C Runtime Library - Bugs: bug #4101, setjmp/longjmp destroy changes in...


bug #4101: setjmp/longjmp destroy changes in global registers

Submitted by:  None
Submitted on:  Wed 25 Jun 2003 08:57:54 PM UTC  
Category:  Library Severity:  4 - Important
Priority:  9 - Immediate Item Group:  None
Status:  Wont Fix Percent Complete:  0%
Assigned to:  Joerg Wunsch <joerg_wunsch> Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 16 Jan 2005 06:30:39 PM UTC, comment #4: 

As there is currently no fix in sight that would not break
legitimate programs, I documented the problem.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Mon 10 Jan 2005 06:07:58 AM UTC, comment #3: 

Final (I hope) version of modifyed setjmp (20050110).
Test set is expanded.

Shortly: saving/restoring registers r2-r17 is excluded from setjmp.

Sun 09 Jan 2005 07:58:43 AM UTC, comment #2: 

Tarball with patched setjmp (S and h) and a set of tests. To test, untar last attached file and run setjmp-tst.sh . Simulavr is needed.

Fri 07 Jan 2005 07:08:23 PM UTC, comment #1: 

Is there a simple test case for this? Or, better still, is there a patch that fixes the problem?

We'd really like to get this one fixed....

Eric Weddington <arcanum>
Project Administrator
Wed 25 Jun 2003 08:57:54 PM UTC, original submission:  

   A prologue/epilogue of function, in which there is a call setjmp(), contains preservation/restoration of all call-saved registers. Exception make function main() and global register variables.
   Nevertheless, setjmp/longjmp too keeps/restores registers r2-r17.
Restoration of local variables after operation longjmp(), certainly is
pleasant, but it is no necessary. But loss of changes in global registers,
in my opinion, is inadmissible.

   avr-gcc (GCC) 3.3.1 20030519 (prerelease)



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #2346:  setjmp-20050110.tar.gz added by None (9KiB - application/x-tgz - Corrected setjmp files and test suite. See README for ditails.)
file #2344:  setjmp-20050109.tar.gz added by None (8KiB - application/x-tgz)
file #2340:  20050108-setjmp.tar.gz added by None (5KiB - application/x-tgz - Test and corrected setjmp.S (preliminary). See details inside.)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty




Follow 9 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-16 joerg_wunsch StatusNone => Wont Fix
    Open/ClosedOpen => Closed
2005-01-12 joerg_wunsch Assigned toNone => joerg_wunsch
2005-01-10 arcanum Priority7 - High => 9 - Immediate
2005-01-10 None Attached File- => Added setjmp-20050110.tar.gz, #2047
2005-01-09 None Attached File- => Added setjmp-20050109.tar.gz, #2045
2005-01-08 None Attached File- => Added 20050108-setjmp.tar.gz, #2041
2004-12-22 arcanum Severity3 - Normal => 4 - Important
    Priority5 - Normal => 7 - High

Back to the top

Powered by Savane 3.5