Re: macOS Catalina: FAIL: t-powm
Jack Howarth writes: Torbjörn, Are you using the clang from Xcode 11? Yes, of course. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: segmentation fault in t-toom53 test with MAC OS X Catalina (Clang 11.0)
There, tfib2m segfaults. Am 08.11.19 um 23:40 schrieb Marc Glisse: On Fri, 8 Nov 2019, JRR wrote: Interestingly now I get a segmentation fault in t-powm test. This is with a new Macbook Pro with i9. Are there any updates on this? If you want to test something, a recent snapshot from https://gmplib.org/download/snapshot/ would be more interesting than 6.1.2. ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: macOS Catalina: FAIL: t-powm
On Fri, Nov 8, 2019 at 8:35 AM Torbjörn Granlund wrote: > Jack Howarth writes: > > FYI, I reported this issue to Apple via radar and their response was... > > Engineering has provided the following information regarding this issue: > It sounds like gmp has a memory corruption issue which -fstack-check has > uncovered. We suggest filing a bug with the developers of gmp. > > So they believe clang is accurately detecting a bug in gmp. A back trace > of > the failure shows... > > bash-3.2# lldb ./t-powm > lldb ./t-powm > (lldb) target create "./t-powm" > Current executable set to './t-powm' (x86_64). > (lldb) r > Process 39643 launched: > '/Users/howarth/gmp_regression/default_build/t-powm' (x86_64) > Process 39643 stopped > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_ACCESS > (code=EXC_I386_GPFLT) > frame #0: 0x7fff71afc386 > libdyld.dylib`stack_not_16_byte_aligned_error > libdyld.dylib`stack_not_16_byte_aligned_error: > -> 0x7fff71afc386 <+0>: movdqa %xmm0, (%rsp) > 0x7fff71afc38b <+5>: int3 > 0x7fff71afc38c <+6>: nop > 0x7fff71afc38d <+7>: nop > Target 0: (t-powm) stopped. > (lldb) bt > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_ACCESS > (code=EXC_I386_GPFLT) > * frame #0: 0x7fff71afc386 > libdyld.dylib`stack_not_16_byte_aligned_error > > I am attaching the test case I created for them. Note that the failure > can > be triggered with only the t-powm executable built using the default > stack > checking so the problem seems to lie there and not in the gmp shared > libraries. > > I cannot repro on a Intel broadwell Mac Air laptop. > > Can you help read the above output? In what GMP function does the > poorly aligned stack occur? > > If it's in mpn_powm, I cannot see how it could be GMP's fault as that > function is in C and never called by our asm. Thus compiler error. > > In a leaf (asm) function, stack alignment is not relevant unless > instructions requiring a certain alignment are used. > > The only scenario which I can see where this would be a GMP bug is if an > asm GMP function made a function call without ensuring proper alignment. > But GMP very rarely make such calls; in fact I can only think of a few > places where that is done. > > -- > Torbjörn > Please encrypt, key id 0xC8601622 > Torbjörn, Are you using the clang from Xcode 11? Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin The LLVM clang 9.0.0 doesn't show the issue with its stack checking as I believe Apple added some custom stack checking code that might not have landed back upstream yet. Jack ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: segmentation fault in t-toom53 test with MAC OS X Catalina (Clang 11.0)
On Fri, 8 Nov 2019, JRR wrote: Interestingly now I get a segmentation fault in t-powm test. This is with a new Macbook Pro with i9. Are there any updates on this? If you want to test something, a recent snapshot from https://gmplib.org/download/snapshot/ would be more interesting than 6.1.2. -- Marc Glisse ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: segmentation fault in t-toom53 test with MAC OS X Catalina (Clang 11.0)
Interestingly now I get a segmentation fault in t-powm test. This is with a new Macbook Pro with i9. Are there any updates on this? Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Am 09.10.19 um 01:07 schrieb Hans Åberg: One might take down MacPorts GCC on MacOS 10.14 and then update to MacOS 10.15, but then it cannot be updated unless MacPorts has done so. On 9 Oct 2019, at 00:52, JRR wrote: I see, I haven't updated my newer Macbook Pro from 2015 (which is Haswell) to 10.15, but updated the XCode. There compilation and running the tests do work. Am 09.10.19 um 00:44 schrieb Hans Åberg: On 8 Oct 2019, at 23:59, Torbjörn Granlund wrote: Juergen Reuter writes: Please let me know any further information you need. This is almost surely a compiler bug. We have encountered countless of bugs in clang since it showed up. We have up-to-date apple systems for running GMP tests, but your clang seems to be newer than what we have. One can take down a Clang 8 binary which might be newer than the inhouse one. I suggest that you install gcc on your system. It might be a pain to compile if you only have a buggy clang on your system, but I believe there are precompiled gcc ready to download. One suggestion is MacPorts which has not yet been updated for this MacOS 10.15. -- -- - Juergen Reuter DESY Theory Group, Bldg. 2a Notkestr. 85 22607 Hamburg, GERMANY Tel +49 (0)40 8998 3895 Fax +49 (0)40 8998 2777 skype: jr_reuter - ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
> On 8 Nov 2019, at 16:59, Niels Möller wrote: > > Hans Åberg writes: > >> How about memory allocations? — There is info here, suggesting uninitialized >> memory access in the test suite: >> https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html > > That issue was fixed by Marco a month and a half ago, see > https://gmplib.org/repo/gmp/rev/0688aef1f7e3. There probably were some > mention of the problem on gmp lists at the time, but I can't look for > that at the moment. > > Seems unrelated to the stack alignment issue, though. OK. Somebody was willing to give it a try, though. :-) ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
> On 8 Nov 2019, at 18:26, Marco Bodrato wrote: > > Il Ven, 8 Novembre 2019 4:59 pm, Niels Möller ha scritto: >> Hans Åberg writes: >> >>> How about memory allocations? — There is info here, suggesting >>> uninitialized memory access in the test suite: > > Our priority is to avoid bugs in the library. So that we usually pay more > attention to the library code than to the code "in the test suite". ;-D Yes, of course. But those that are encouraged to make check get a scare. :-) ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
Ciao, Il Ven, 8 Novembre 2019 4:59 pm, Niels Möller ha scritto: > Hans Åberg writes: > >> How about memory allocations? — There is info here, suggesting >> uninitialized memory access in the test suite: Our priority is to avoid bugs in the library. So that we usually pay more attention to the library code than to the code "in the test suite". ;-D > That issue was fixed by Marco a month and a half ago, see > https://gmplib.org/repo/gmp/rev/0688aef1f7e3. There probably were some > mention of the problem on gmp lists at the time, Of course: https://gmplib.org/list-archives/gmp-bugs/2019-September/004625.html > Seems unrelated to the stack alignment issue, though. Completely unrelated. Ĝis, m -- http://bodrato.it/papers/ ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
Hans Åberg writes: > How about memory allocations? — There is info here, suggesting uninitialized > memory access in the test suite: > https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html That issue was fixed by Marco a month and a half ago, see https://gmplib.org/repo/gmp/rev/0688aef1f7e3. There probably were some mention of the problem on gmp lists at the time, but I can't look for that at the moment. Seems unrelated to the stack alignment issue, though. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
> On 8 Nov 2019, at 15:48, Torbjörn Granlund wrote: > > There is info here, suggesting > uninitialized memory access in the test suite: > https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html > > What are you trying to contribute to the discussion in the Subject line? > > Apple suggests that the stack pointer is not properly aligned. > > The quoted text does not seem to have anything to do with the issue at > hand. It is the same issue, but discussed on another list. I leave it up to you to interpret it: I was interested in another issue. ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
Hans Åberg writes: > On 20 Oct 2019, at 22:14, Torbjörn Granlund wrote: > > Believe it or not, but the GMP devs are pretty good at computer > arithmetic. How about memory allocations? — There is info here, suggesting uninitialized memory access in the test suite: https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html What are you trying to contribute to the discussion in the Subject line? Apple suggests that the stack pointer is not properly aligned. The quoted text does not seem to have anything to do with the issue at hand. Let's help to keep the signal-to-noise ration high here on the GMP lists. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang
> On 20 Oct 2019, at 22:14, Torbjörn Granlund wrote: > > Believe it or not, but the GMP devs are pretty good at computer > arithmetic. How about memory allocations? — There is info here, suggesting uninitialized memory access in the test suite: https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: macOS Catalina: FAIL: t-powm
Jack Howarth writes: FYI, I reported this issue to Apple via radar and their response was... Engineering has provided the following information regarding this issue: It sounds like gmp has a memory corruption issue which -fstack-check has uncovered. We suggest filing a bug with the developers of gmp. So they believe clang is accurately detecting a bug in gmp. A back trace of the failure shows... bash-3.2# lldb ./t-powm lldb ./t-powm (lldb) target create "./t-powm" Current executable set to './t-powm' (x86_64). (lldb) r Process 39643 launched: '/Users/howarth/gmp_regression/default_build/t-powm' (x86_64) Process 39643 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x7fff71afc386 libdyld.dylib`stack_not_16_byte_aligned_error libdyld.dylib`stack_not_16_byte_aligned_error: -> 0x7fff71afc386 <+0>: movdqa %xmm0, (%rsp) 0x7fff71afc38b <+5>: int3 0x7fff71afc38c <+6>: nop 0x7fff71afc38d <+7>: nop Target 0: (t-powm) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) * frame #0: 0x7fff71afc386 libdyld.dylib`stack_not_16_byte_aligned_error I am attaching the test case I created for them. Note that the failure can be triggered with only the t-powm executable built using the default stack checking so the problem seems to lie there and not in the gmp shared libraries. I cannot repro on a Intel broadwell Mac Air laptop. Can you help read the above output? In what GMP function does the poorly aligned stack occur? If it's in mpn_powm, I cannot see how it could be GMP's fault as that function is in C and never called by our asm. Thus compiler error. In a leaf (asm) function, stack alignment is not relevant unless instructions requiring a certain alignment are used. The only scenario which I can see where this would be a GMP bug is if an asm GMP function made a function call without ensuring proper alignment. But GMP very rarely make such calls; in fact I can only think of a few places where that is done. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs