Changeset 5434000 in mainline for uspace/lib/libc/generic/stacktrace.c


Ignore:
Timestamp:
2010-01-02T17:51:14Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c83d2b4
Parents:
50286ec
Message:

Tail call optimization can be harmful for the functionality of stack_trace() on
some architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/stacktrace.c

    r50286ec r5434000  
    5252{
    5353        stack_trace_fp_pc(frame_pointer_get(), program_counter_get());
     54        /*
     55         * Prevent the tail call optimization of the previous call by
     56         * making it a non-tail call.
     57         */
     58        (void) frame_pointer_get();
    5459}
    5560
Note: See TracChangeset for help on using the changeset viewer.