On Wednesday, 30 May 2018 22:21:56 UTC+1, Mike Terry wrote: > > Hi, I'm new to MPIR, and really am just playing around/familiarising > myself with what it can do at the moment. My program produced an AV when > calling mpz_powm with large exp and mod parameters. This seems to be due > to a miscalculation of a buffer size in , which has gone over 2^32 and so > been truncated, resulted in a buffer smaller than expected by the > subsequent MPIR code. > > [snip details]
Thank you, Mke, for your comprehensive bug report, the detail of which is much appreciated. You are, of course, right that the code should detect and return an error rather than an access violation when a memory allocation request overflows 32-bits. Sadly, however the code comes from an age when such large requests were not considered too seriously and there are hence numerous places in the code where this issue is likely to show itself. In consequence it would require quite a bit of effort to rectify the problem and this, when combined with limited development resources and the fact that it doesn't occur on 64-bit Windows (now the priority), means that we will have to live with the issue on 32-bit Windows systems. I recognise that telling users to move to 64-bit Windows won't be helpful for those who can't, or don't want to, do this. But this is the only practical solution for those who want to deal with multiple precision arithmetic that is likely to require memory allocations of 4GB or more. -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.