Bill Allombert on Sun, 19 Feb 2023 19:23:52 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Segmentation Fault in Pari/GP from gp2c-run
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Segmentation Fault in Pari/GP from gp2c-run
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sun, 19 Feb 2023 19:22:36 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1676830955; c=relaxed/relaxed; bh=iud2lgLnCiPYivOaGXrK6TT/e4eqt0Il4ZUyB7eD2S0=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=lhpdmPyM8LnB7hh6SHcVhWklWzSeZCTRpa9mivq915Zcu8QQulxeUDh3swMgdPPLRigx17y8sHU9n2KqLvHlDIa6hPZdHTHOIC+QNQx5t3lBpu7mmUvFNb8ZbQnhRHHeAP7ojiFP5Spqlvzu3FhIi5m3OLuDxRaZDU2ppjWslk+Nd0O8HAdPTdLe8uiWpVlFiixIcnhFXd8chEF3mXPkR91E05oSho3lL/lDMJuVM8I4wA0YmxMmmKqTDdaOCmbCJ1j0A4a8/zqxkfCp+xGoyESpcbHfPeohQxkjmdht1iRT6qc+WibioFr0bVXbRNbBI9V7AU+eJNYncZNMZD+bGIdCJsIgX230j9OeDXzSuVfAUyoCMIutZJuZWox6Za0AUzs2yvuDMg1hxCk/+WK1MhBlGEFU+CM7B4/2+a1WlBIxSZ9pd8z1RPqVM7q+MM1sZxc/zOQsfAfjVCEAfP9iRAfInhXPwOtqX4+zee5iLLZd7E8cBzps2qIodRUQ2Y1FwITxqFho0BamWiakFAcFXqDeBlVYH/ysDTTuxH6j2OdMWo+jYSRl/C1c3FMhd74pBPoDd5spGunu98xo6Z++KBGKczGhYTv9exPG20RNDgmeMJk4K3nTxXqfrKiaRlmVjnMjZEZBCX2EouHWvawbfdBv+g4mr5BLH4fVoFmaOgE=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1676830955; cv=none; b=DQ8JPYR9+egjjkERTwEHATzEbiTF4mpj96omUZCbtIycv6cAIC+RmCwtg8eYnvAqajPZRlxeUNBmJ+30/eX/pFUHIKIHZxcglrQ+7hIMUQqJfcUyZgxSE968fpsH/z6MD1NyRJ+hdh42EtpHerbK+dP6461Yjc8sqZOx5eIqecJvTLROdUpXlw/2hyCXmutgBNQID2eBpEb9PzqlNzx/Nt6FHFCv0MmGe+xHHemzYLoFoZNLhfmBblGWe505/U86dwaCUE2feQM8+Y1NhJa5DqBasbESjCJI14zrLmVDpf5QCKXVxFG2dLDkoOX+8sDtsTG+YohhBa/DE3Rp5v0NytMqjwBHbZlfuWDP8xnQmLnAThft6E038JifckG6FyuVRfxKt94cJRE+HfJykQsbeuHgbLbkbtw8d6VHXTpmOR6Ep1Pj7r6jZKwtQ8+71dzUUHqItSvukrbd9uHvQT64sk995rppf1LGfEa8wPMx6FS3S22L2mQKjMMDN5gk+o1ntCuJFOZJycR7P2JHfBQfOxHwDS1DHwXlcS1f6jPKXrB0BrWpXLz1P6dF3bIFc9XdH2D2NRSIpmfvLaTrAfj7uaq5bJmIk0TX9a4amkwgnCjPUXoF+l6NNUyQE+tmz4XX7EmQizI6LEEJjKdNXPaz9LW9/je7VWoyvY0XEmR0CRQ=
- Authentication-results: smail; arc=none
- Delivery-date: Sun, 19 Feb 2023 19:23:52 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1676830955; bh=iud2lgLnCiPYivOaGXrK6TT/e4eqt0Il4ZUyB7eD2S0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=f/aKu+8HZLgjNcD8U1HZayKrTZwN+lXsNA86+vD8yhLEgxJyzlmWJ9fnTAU3K5Fcj HasPIIdQrh2BtMuNnx/dLsX1J7mi6eFJbHjxt6Qc51XU3XxOUlSvs3wOljejYafZKl ENe0ongWYFt62mGmS2KWwGKmt9YVbQtR8syd0hjSNsh+22vQPfyK2xRqVVfT/qeRF9 Ae9XiPCkuMzzC/VbbSwjMWhaJOeD7XHJzrBmNDsLNojcodIf+afCPkEAGHvzAVjB1F hX24kKAtMo2OheyKunqCV1W6i7FOgR+ug/GddGBpdRjkfXtw88RrWaQdMlK5tdCc0b hQU+gtgBp6qmw6WNpvi1dUDnSDa/LpOs9MocwXcAhe3FDT0zrXxY2TfTdLlb58fz2E p3uWQcQmYJ1XVBi14r+ts5mVThwtvYNjj6aVdXehiPvg9/cEfaBpucDx4bdCuNSMIu oo1a78GjwkrKPWPvuqsrJhRRJ0ra75MX1M8p8Kky7DLTTHFatALqH2NRgEGSsibD8x lst5I80P19yHgbwgrdwsYNrsqZifNqQidPEakxv/PAuKDfoKAczg3BqyothB8GC2jA 4i04AO+dkF5IkfCwRD8SQlHkzbDYLVmufM6+2ENRm6xv8bjE0XvJPeK88aPjgWJFKu y4XvuIwpQIP1adfCb42oVUkU=
- In-reply-to: <Y/JVJMiYvJXrpMeS@seventeen>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <6FB850AA-F6F6-4749-B8A9-A17181801B2D@gmail.com> <Y/JVJMiYvJXrpMeS@seventeen>
On Sun, Feb 19, 2023 at 05:58:12PM +0100, Bill Allombert wrote:
> On Sun, Feb 19, 2023 at 07:57:32AM -0800, Edmond Griffin wrote:
> > Hello,
> >
> > I am working on an old conjecture of Erdos-Turan using Pari/GP. Although the computations are simple, the number of them is very large. To speed things up, I hoped to convert my .gp code into C using gp2c. I am having difficulty doing so.
> >
> > I believe both gp and gp2c were built successfully on my machine - a quad core i7 MacBook Pro. When I compile and run the code using gp2c-run I get no warnings of undeclared or unused variables. I do get the following warning before gp starts:
> >
> > ld: warning: -undefined dynamic_lookup may not work with chained fixups
> >
> >
> > Then when I call my function (extDnkc) I get
> >
> > ? extDnkc(15,6,0,"/Volumes/BinPolyData/Diffs/")
> > *** user warning:
> > *** at top-level: extDnkc(15,6,0,"/Volumes/BinPolyData/Diffs/")
> > *** ^---------------------------------------------
> > *** extDnkc: bug in PARI/GP (Segmentation Fault), please report.
> >
> >
> > Can you suggest a course of action?
> > fName = strjoin([fPath,strprintf("D_%d_%d_TN.csv", n, k)]);
> > iferr(fIn=fileopen(fName,"r"), ERR,
> > warning(strprintf("Bad input file: %s",fName)); return,errname(ERR)=="e_FILE");
>
> Indeed, there is a bug in PARI that cause warning() to be miscompiled by gp2c.
> I suggest to replace warning() by print() until we fix it.
> Sorry for the trouble!
If you are willing to rebuild both pari and gp2c to fix this issue, in
the PARI file 'src/functions/programming/warning' replaces the line
(?gen,...):void pari_warn(warnuser, "${2 format_string}"${2 format_args})
by
(gen,...):void pari_warn(warnuser, mkvecn($#, $2))
(with a leading space), or just remove it.
This is fixed in the GIT commit 1495659ef3eb71072f392a5e1adbd4264bc4d466
in the master branch.
Thanks for reporting this issue!
Cheers,
Bill