mainlibffcall - foreign function call libraries - Support: sr #111190, Power64 issue with GCC 15

 
 

sr #111190: Power64 issue with GCC 15

Submitter:  Jerry James <jjames>
Submitted:  Sat 15 Feb 2025 04:00:33 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sat 15 Feb 2025 07:16:12 AM UTC, comment #2: 

And:
- What were the results of "make check" in libffcall without your patch?
- What are the results of "make check" in libffcall with your patch?

Bugs in libffcall should normally really surface during "make check", not when libffcall is integrated into clisp.

Bruno Haible <haible>
Group administrator
Sat 15 Feb 2025 04:18:12 AM UTC, comment #1: 

GCC 15 is not released yet. So, the change in ABI could be intentional or unintentional.

Can you please try to find a mention of this ABI change in the GCC documentation?

If you can't find it, the change is most likely unintentional, and you should file a bug report for GCC. Please don't file it at the Fedora project (where the GCC maintainers may not be listening), but directly at gcc.gnu.org.

Bruno Haible <haible>
Group administrator
Sat 15 Feb 2025 04:00:33 AM UTC, original submission:  

The Fedora Linux project recently rebuilt all packages with a prerelease of GCC 15.  The clisp package failed to build on ppc64le with a segfault when running the readline tests.  GDB shows that when readline:bind-key has been used, the stack frame for _rl_dispatch_subseq is overwritten in the first few instructions of callback_receiver.  In vacall/vacall-powerpc64.c, I see this comment near the top:


/* When a parameter is passed in a register,
 * stack space is still allocated for it.
 */


That seems to no longer be the case with GCC 15, so the attempt to save registers in the supposed saved space actually writes over the next stack frame up.  I modified callback/vacall_r/vacall-powerpc64-elfv2-linux.S to save 288 bytes of stack space, rather than 224, then stored registers 3 through 10 in 200(31) through 256(31), rather than 256(31) through 312(31).  See the attached patch.  With that change, clisp builds successfully on ppc64le with GCC 15.

Jerry James <jjames>

 

Attached Files

Attached Files
file #56898:  ffcall-ppc64le.patch added by jjames (1.9KiB - text/x-patch - Patch for ppc64le)

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by jjames (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-02-15 haible StatusNone Need Info
    2025-02-15 jjames Attached File- Added ffcall-ppc64le.patch, #56898

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code