Re: Any insight on what targets _endless_loop__ in libcrt0

Peter Bigot <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <CAPOJ94PQXjWShvWX47nNXp_3g+1jnqdoKoUJDxwZ-cMA8=v5Fw@mail.gmail.com>
__endless_loop__ is placed in section .fini0 (the last of the nine reserved
finalization sections).  One way it can be reached in a normal application
is falling off the end of main().  It is what follows any other
finalization routines, including __stop_progExec__, which is normally empty
and appears in section .fini9.  __stop_progExec__ is jumped to by exit(3c)
if the macro definition of exit() from stdlib.h in msp430-libc is invoked.

So: Returning from main(), invoking exit(3c), or other magic that causes
code to jump into the finalization sections.

Peter


On Fri, Dec 20, 2013 at 6:31 PM, Andrew McLaren <[email protected]>wrote:

> Hi all,
>
> I've got a situation where some logic (running on a 439 MSP430) ends up in
> _endless_loop__ which is part of libcrt0. This can happen after the logic
> has been happily running some intensive test logic for hours, and I'm
> trying
> to ascertain how it could end up there. The debugger is not giving me a lot
> of help (specifically no traceback of how it got here).
>
> There is always a possibility that some memory corruption of mine has let
> the logic go awol, and by its nature if it hits this logic it will be
> trapped here. What I suspect is more likely is that _endless_loop__ is the
> deliberate target of an unrecoverable error in one of the C functions
> (which
> itself is no doubt triggered by something I have done!).
>
> Can someone who understands the msp C runtime support give me any insights
> into the intent behind _endless_loop__, and in what situations it could be
> invoked. If I understand this better it may give me some clues where to
> look.
>
> Thanks, regards, and a great Christmas to all.
>
> Andrew
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.