This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context.


https://sourceware.org/bugzilla/show_bug.cgi?id=18125

            Bug ID: 18125
           Summary: aarch64: arm: nios2: hppa: setcontext incorrectly
                    calls _exit after last linked context.
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: carlos at redhat dot com
                CC: drepper.fsp at gmail dot com

There appears to be a discrepancy amongst the port implementations
of setcontext with regards to the function called once the last
linked-to context has finished executing.

The POSIX standard says:
~~~
If the uc_link member of the ucontext_t structure pointed to by 
the ucp argument is equal to 0, then this context is the main 
context, and the thread will exit when this context returns. 
~~~

It says "exit" not "exit immediately" or "exit without running
functions registered with atexit or on_exit."

Therefore the AArch64, ARM, hppa and NIOS II implementations are
wrong and no test detects it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]