<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in swapcontext_test.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>8efa35fea384d209c683dfbae8f49f2737a41941 - libc/powerpc64: Fix swapcontext(3)</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/lib/libc/tests/sys/swapcontext_test.c#8efa35fea384d209c683dfbae8f49f2737a41941</link>
        <description>libc/powerpc64: Fix swapcontext(3)On PowerPC platforms a valid link to the Table of Contents (TOC) isrequired for PLT lookups to function.  This TOC pointer is stored ina dedicated register, and is used along with the stack pointer by bothC prologue and PLT lookup code.When calling swapcontext() with uc_link != NULL, a PLT lookup tosetcontext(3) is attempted from within the _ctx_done context.  Theexiting process has usually trashed both r1 and r2 at this point,leading to a crash within the PLT lookup before setcontext(2) isreached to restore the linked context.Save and restore r2 as in a regular function.  This ensures thesubsequent PLT lookup to setcontext(3) succeeds.Signed-off-by: Timothy Pearson &lt;tpearson@raptorengineering.com&gt;MFC after:	1 weekPull Request:	https://github.com/freebsd/freebsd-src/pull/1759

            List of files:
            /freebsd/lib/libc/tests/sys/swapcontext_test.c</description>
        <pubDate>Tue, 08 Jul 2025 15:41:15 +0200</pubDate>
        <dc:creator>Timothy Pearson &lt;tpearson@raptorengineering.com&gt;</dc:creator>
    </item>
</channel>
</rss>
